Python program to find the factorial of a given number
kw.py
print("________________________________________")
print("Program to find the factorial of number")
print("________________________________________")
n=int(input("Enter the number "))
if(n<0):
    print("Factorial does not exits for",n)
else:
    fact=1
    while(n>0):
        fact=fact*n
        n=n-1
    print("Factorial",fact)
print("________________________________________")
Output
kodingwindow@kw:~$ python3 kw.py
________________________________________
Program to find the factorial of number
________________________________________
Enter the number 25
Factorial 15511210043330985984000000
________________________________________

//Note: This program can find 500!
Advertisement