Following program shows you how to print factorial of given number.
In this program we get number from user and prints factorial of that number using
number = int(input("Enter a number:")) result = 1 for i in range(1, number + 1): result = result * i print(number, " factorial is: ", result)
Enter a number: 8 8 factorial is: 40320
On By Navya
Getting 'No EntityManager with actual transaction available for current thread' exception while removing some data
How to fix Found use of deprecated [org.hibernate.id.SequenceGenerator] sequence-based id generator; use org.hibernate.id.enhanced.SequenceStyleGenerator instead
Unable to start Spring Boot + PostgreSQL App, Getting org.postgresql.util.PSQLException: FATAL: password authentication failed for user