514 B
514 B
Practical Example
Below is a practical example illustrating the definition and invocation of a function in AVAP™:
Definition of a Function to Calculate the Area of a Circle
function calculate_circle_area(radius){
return (3.14 * radius ** 2)
}
Calling the Function
circle_radius = 5
area = calculate_circle_area(circle_radius)
result = "he area of the circle is: %s " % area
addResult(result)
Output:
The area of the circle is: 78.5