Skip to content

Commit bde1393

Browse files
committed
Added iterative solution for power calculation FIXES NUMBER 12709
1 parent 53ca0d3 commit bde1393

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

maths/power_using_recursion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ def power(base: int, exponent: int) -> float:
6060
result = power(base, abs(exponent))
6161
if exponent < 0: # power() does not properly deal w/ negative exponents
6262
result = 1 / result
63-
print(f"{base} to the power of {exponent} is {result}")
63+
print(f"{base} to the power of {exponent} is {result}")

0 commit comments

Comments
 (0)