Created
August 21, 2014 13:43
-
-
Save wegorich/0ac26eb71ea9288550a6 to your computer and use it in GitHub Desktop.
simple fib function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def fib(n): | |
| a, b = 0, 1 | |
| while a < n: | |
| print(a) | |
| a, b = b, a+b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment