import math base = 2 exponent = 3 result = math.pow(base, exponent) print(f"{base} raised to the power of {exponent} is {result}")
Output:
2 raised to the power of 3 is 8.0
import math base = 2 exponent = 3 result = math.pow(base, exponent) print(f"{base} raised to the power of {exponent} is {result}")
Output:
2 raised to the power of 3 is 8.0