Answers for "factorial function of pythin"

5

factorial in python

def factorial(n):
    if n == 0:
        return 1
    else:
        return n * factorial(n-1)
n=int(input("Input a number to compute the factiorial : "))
print(factorial(n))
Posted by: Guest on November-23-2020

Code answers related to "factorial function of pythin"

Python Answers by Framework

Browse Popular Code Answers by Language