We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 298a3e8 + d38281f commit 511d41dCopy full SHA for 511d41d
1 file changed
factorial.py
@@ -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