Python program to find the power of a number using recursive

0
15
def power(base,exp):
    if(exp==1):
        return(base)
    if(exp!=1):
        return(base*power(base,exp-1))
#____main_____
b=int(input("Please enter base: "))
e=int(input(" Please enter exponential value: "))
print("Result:",power(b,e))

    Output 1:
          Please enter base: 4
          Please enter exponential value: 4
          Result: 256
    Output 2:
          Please enter base: 2
          Please enter exponential value: 9
          Result: 512

इन्हें भी देखें।

Python Programs के लिये यहाँ click करें।

 

 

 

Python program to find the power of a number using recursive program to find the power of a number using recursive in python write a python program to find the power of a number using recursive write a program to find the power of a number using recursive in python program to find the power of a number using recursive Python program to find the power of a number program to find the power of a number power of a number find the power of a number python program to find the power of a number using recursion program to find power of a number using recursion write a python program to find the power of a number using recursion write a program to find power of a number using recursion program to find the power of a number in python write a program to find the power of a number python program to find the power of a number program to find power of number using recursion program to find power of a number using recursion in python find the power of a number using recursion in python program to find power of a number in python using recursion python program to find power of number using recursion python program to find power of any number using recursion find the power of a number using recursion write a program to calculate the power of a number using recursion wap to find power of a number using recursion to find power of a number using recursion

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here