Skip to content

Commit 511d41d

Browse files
authored
Merge pull request #16 from developergaurav-exe/main
Add Factorial Python Program
2 parents 298a3e8 + d38281f commit 511d41d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

factorial.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# input vlaue from the user
2+
n=int(input('enter no: '))
3+
4+
# take flag, f=1
5+
f=1
6+
7+
# loop until the user input value
8+
for i in range(n):
9+
f=f*(i+1)
10+
11+
# print the output/factorial
12+
print ('Factorial: ',f)

0 commit comments

Comments
 (0)