Spaces:
Sleeping
Sleeping
File size: 488 Bytes
7c6f75d 008360b 7c6f75d 008360b 7c6f75d 008360b 7c6f75d 008360b 7c6f75d 008360b 7c6f75d 008360b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | // Basic math operations in AVP
fun add_numbers(a, b):
return a + b
end fun
result = add_numbers(5, 3)
fun max_value(x, y):
// Compare two values and return the larger one
@mark<x, outline, yellow> if (x > y):
@mark<x, highlight, green> return x
end if
@mark<y, highlight, green> return y
end fun
result = max_value(10, 7)
fun power_of(base, exponent):
// Demonstrating the power operator
return base ** exponent
end fun
result = power_of(2, 8)
|