Answers for "Factorial in Python numpy"

2

numpy factorial

a = np.math.factorial(n)
Posted by: Guest on January-27-2021
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

Python Answers by Framework

Browse Popular Code Answers by Language