Skip to content

Commit bdc4447

Browse files
authored
Merge pull request #22 from Paras-code/patch-3
Create Recursion.py
2 parents f7b2135 + 3573cb0 commit bdc4447

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Recursion.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def fibonacci(n):
2+
if n == 0 or n == 1:
3+
return n
4+
else:
5+
return fibonacci(n-1) + fibonacci(n-2)
6+
print(fibonacci(10))

0 commit comments

Comments
 (0)