Last active
April 8, 2018 20:39
-
-
Save JonnyBanana/de7f06ffef007f866f23e87193a0475e to your computer and use it in GitHub Desktop.
Easy Fibonacci Sequence Calculator in Python
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 < WRITE THE MAXIMUM NUMBER OF THE SEQUENCE): | |
print(b) | |
a,b=b,a+b | |
### EXAMPLE, CALCULATE THE SEQUENCE UP TO NUMBER 1000000 ### | |
a,b=0,1 | |
while(b < 1000000): | |
print(b) | |
a,b=b,a+b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment