kAldown

fib

May 7th, 2015
370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.11 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()
Advertisement
Add Comment
Please, Sign In to add comment