Created
November 3, 2019 05:36
-
-
Save afaqk9394/379001dfd163ae9508075cc67f8bc878 to your computer and use it in GitHub Desktop.
fibonacci
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 fib1(n): # print Fibonacci series up to n | |
| x, y = 0, 1 | |
| while x < n: | |
| print(x, end=' ') | |
| x, y = y, x+y | |
| print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment