Python Program to find Factorial of a Number

Python Program to find Factorial of a Number

Factorial of n is the product of all positive descending integers. Factorial of n is denoted by n!
For example, n! = n * (n-1) * (n -2) * …….* 1

Factorial in Python :


number = int(input("Please enter any Number to find factorial : "))
fact = 1

for i in range(1, number + 1):
    fact = fact * i
print("The factorial of %d is = %d" %(number, fact))
  

Output :