We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 404d43e commit ea81376Copy full SHA for ea81376
factorial.py
@@ -0,0 +1,7 @@
1
+def fact(x):
2
+ if x == 0:
3
+ return 1
4
+ return x * fact(x - 1)
5
+
6
+x=int(input())
7
+print(fact(x))
0 commit comments