I have this:
def main():
input1 = input('Enter an integer for the base:')
input2 = input('Enter an integer for the exponent:')
main()
This is what I fully need to do:
Create a main, and a power function. Half done.
prompt the user to enter an integer for the base of the power. Done.
prompt the user for an integer for the exponent of the power. Done.
call the power function and print its returned value. Can do.
The recursive power function, power(base,exponent), must recursively calculate the value of the power and then return it. Need help with this.
I have been trying to learn the recursive function stuff the past two days, and cannot seem to wrap my head around it. Could someone provide me a walk through of this, so I can mess around with it, so I can understand it better? Thanks!