Skip to content

Instantly share code, notes, and snippets.

@JonnyBanana
Last active April 8, 2018 20:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonnyBanana/de7f06ffef007f866f23e87193a0475e to your computer and use it in GitHub Desktop.
Save JonnyBanana/de7f06ffef007f866f23e87193a0475e to your computer and use it in GitHub Desktop.
Easy Fibonacci Sequence Calculator in Python
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