Junior — Senior
Calculating the power of a number (option 2)
livecode
Task condition
It is necessary to write a function power(base, exponent) that returns the value of base raised to the power of exponent.
base — a floating-point number (float) exponent — an integer (int)
The function should work correctly for both positive and negative values of exponent.