8000 Fibonacci sequence program and updated readme · danjethh/programminginpython.com@b413512 · GitHub
[go: up one dir, main page]

Skip to content

Commit b413512

Browse files
committed
Fibonacci sequence program and updated readme
1 parent 7fc55e9 commit b413512

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
__author__ = 'Avinash'
2+
3+
def fibonacci(n):
4+
if n == 1:
< 65E6 code>5+
return 1
6+
elif n == 0:
7+
return 0
8+
else:
9+
return fibonacci(n-1) + fibonacci(n-2)
10+
11+
number = int(input("Enter an integer: \t"))
12+
for i in range(number):
13+
print(fibonacci(i))

0 commit comments

Comments
 (0)
0