Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

is power of python recursion

def power(base,exp):
    if(exp==1):
        return(base)
    if(exp!=1):
        return(base*power(base,exp-1))
base=int(input("Enter base: "))
exp=int(input("Enter exponential value: "))
print("Result:",power(base,exp))
Comment

PREVIOUS NEXT
Code Example
Python :: append one row to pandas dataframe 
Python :: block window if another window is open tkinter 
Python :: how to display address in python 
Python :: python pyramid 
Python :: print only numbers from string python 
Python :: cool things to do with python 
Python :: python use variable in regex expression 
Python :: import sklearn.metrics from plot_confusion_matrix 
Python :: webbrowser python 
Python :: how to define a constant in python 
Python :: how to change os path in python 
Python :: what is kali 
Python :: tkinter menus 
Python :: change variable type python 
Python :: how to get an input into a list python 
Python :: pandas series quantile 
Python :: linking custom CSS in flask 
Python :: create new env in anaconda 
Python :: seaborn bar plot dataset 
Python :: replace value pandas df 
Python :: round up division python 
Python :: pandas dataframe remove rows by column value 
Python :: how to use the print function in python 
Python :: get a slice of string in python 
Python :: python adding digits 
Python :: create new dataframe with columns from another dataframe pandas 
Python :: python groupby sum single columns 
Python :: pandas name of day 
Python :: python array to string 
Python :: assert keyword python 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =