PY
py
1
2
3
4
5
6
7
8
9
#Created by Intermediate Depression
n = int(input() or "5")
sum = 1
def factorial(x):
global sum
for i in range(1, x+1):
sum *= i
return sum
print(factorial(n))
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run