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 4964c56 commit 59efcf0Copy full SHA for 59efcf0
01 - Recursion/Factorial.py
@@ -0,0 +1,9 @@
1
+
2
+def factorial(number):
3
+ if number in [0, 1]:
4
+ return 1
5
+ else:
6
+ return number * factorial(number - 1)
7
8
9
+print(factorial(5))
0 commit comments