def exponents(num1,num2):
if (num2==0):
return 1
else:
return num1*exponents(num1,num2-1)
Hey I was wondering how I can generate a list of exponents using a for loop or a while loop so that the numbers display like this:
Input (2,3)
Output 2,4,8
What I have so far only returns the answer,
Please assist if possible, I am really not getting the hang of this loop thing.