What is recursion?
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
It will take less than 1 minute to register for lifetime. Bonus Tip - We don't send OTP to your email id Make Sure to use your own email id for free books and giveaways
Answers ( 2 )
When a function calls itself it is known as recurssion.
For example:
def factorial(n):
if(i==0 || i==1):
When a function calls itself it is known as recurssion.
For example:
def factorial(n):
if(i==0 || i==1):
return 1
else
return n*factorial(n-1)