Skip to content

Commit 2687c6c

Browse files
Create Fibonacci.py
1 parent 6f08f62 commit 2687c6c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

F/Fibonacci.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
def fibonacci(n):
2+
a, b = 0, 1
3+
while a < n:
4+
print(a, end=' ')
5+
a, b = b, a+b
6+
print()
7+
8+
fibonacci(1000)

0 commit comments

Comments
 (0)