Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

What Is Python Recursive Function in python

 pythonCopydef fact(n):
    """Recursive function to find factorial"""
    if n == 1:
        return 1
    else:
        return (n * fact(n - 1))
a = 6
print("Factorial of", a, "=", fact(a))
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #What #Is #Python #Recursive #Function #python
ADD COMMENT
Topic
Name
1+2 =