Python program to find the power of a number using recursive

Python program to find the power of a number using recursive

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...

Stay connected

19,697FansLike
2,180FollowersFollow
14,700SubscribersSubscribe
- Advertisement -

Latest article

Python program to display the fibonacci sequence using recursive

Python program to display the fibonacci sequence using recursive

def recursive_fibo(num): if num <= 1: return num else: ...
Python program to find the product of two numbers using recursive

Python program to find the product of two numbers using recursive

def mult_product(x,y): if(x<y): return mult_product(y,x) elif(y!=0): ...
Python program to convert octal to decimal using function

Python program to convert octal to decimal using function

def octal_to_dec(n): # Function which is convert octal to decimal num = n; dec_value = 0; ...