CALCULATING FACTORIALS IN PYTHON LANGUAGE

= int(input("Enter Here You Want to calculate the factorial: "))
= 1
for i in range(1,n+1):
    x *= i
print(x)
"""
FACTORIAL EXAMPLE:
1! = 1
2! = 2*1 = 2
3! = 3*2*1 = 6
4! = 4*3*2*1 = 24
5! = 5*4*3*2*1 = 120
"""

Comments

Popular posts from this blog

MY FIRST MYSQL PROJECT I EVER MADE

A SIMPLE GAME FOR A BEGINNER IN PYTHON WITH ONLY TWO MODULES