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=1while(n>0):fact=fact*nn=n-1print("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!
Dear User, Thank you for visitng KodingWindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.