67. Python Program to find the Factorial of a given number.
How does this program work?
- This program is used to find the factorial of a given number using Python.
- Factorial number is defined by the product of all the digits of given number.
- Factorial of 0 is always 1.
Here is the code
n = int(input("Enter a number: "))
i = 1
fact = 1
while i <= n :
fact *= i #(fact = fact*i)
i += 1
print("Factorial of ",n ," is: ",fact)