Answers for "how to use factorial python"

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 "how to use factorial python"

Python Answers by Framework

Browse Popular Code Answers by Language