def main():
base = input('Please Enter An Integer for the Base: ')
exponent = input ('Please Enter An Exponent: ')
def power (base, exponent):
if exponent == 0:
return base
else :
return base * power(base, exponent - 1)
main()
SAMPLE OUT:
Enter an integer for the base: 2
Enter an integer for the exponent: 5
2 to the power 5 equals 32
powerfunction. Think about what your function would return if you hadexponent == 0andbase == 5. Now think about what the function should return.