Reply to comment
Factorial Program in Python
Tagged:
The factorial of a positive integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example, 6! = 1 x 2 x 3 x 4 x 5 x 6 = 720. Below is a python program to identify this number.
n = input("enter positive integer:")
if n < 0:
print "error: you entered negative integer"
else:
product = 1
for i in range(1, n+1):
product = product * i
print n, "!=", product
ouput
![]()

Recent comments
5 days 3 hours ago
2 weeks 4 days ago
3 weeks 1 hour ago
3 weeks 1 hour ago
4 weeks 2 days ago
4 weeks 5 days ago
4 weeks 5 days ago
6 weeks 1 day ago
7 weeks 3 days ago
7 weeks 3 days ago