Skip to content

Commit 4a2a664

Browse files
committed
Recursion file added
1 parent b1014e6 commit 4a2a664

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

.idea/workspace.xml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Recursion.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
def factorial(n):
2+
if n==0:
3+
return 1
4+
return n*factorial(n-1)
5+
6+
num = 5
7+
print(factorial(num))

0 commit comments

Comments
 (0)