Primitiv0

Fibonacci

Sep 10th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.12 KB | None | 0 0
  1. def fib(n):
  2.     a, b = 0, 1
  3.     while a < n:
  4.         print(a, end=' ')
  5.         a, b = b, a+b
  6.     print()
  7. fib(1000)
Add Comment
Please, Sign In to add comment