Skip to content

Commit 884c8f4

Browse files
Merge pull request #21 from UtkarshPrajapati/main
Create fibonacci.py
2 parents 97a6116 + 4392982 commit 884c8f4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fibonacci.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def fibonacci_of(n):
2+
if n in {0, 1}:
3+
return n
4+
return fibonacci_of(n - 1) + fibonacci_of(n - 2)
5+
for i in range(1,100):
6+
print(fibonacci_of(i))

0 commit comments

Comments
 (0)