Created
February 24, 2013 10:49
-
-
Save zhenyi2697/5023390 to your computer and use it in GitHub Desktop.
Python: Simple Fibonacci Sequences
This file contains 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
>>> a, b = 0, 1 | |
>>> while b < 1000: | |
... print b, | |
... a, b = b, a+b | |
... | |
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment