Created
December 29, 2018 18:56
-
-
Save doper0/c193137d2c11df5774576613f009674b to your computer and use it in GitHub Desktop.
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
#Shows the Fibonacci series up to the number the user has selected | |
x,y=0,1 | |
z=int(input('enter a number')) | |
r=0 | |
z=z-1 | |
while r<=z: | |
x,y=y,y+x | |
r=r+1 | |
print(r,'.',x) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shows the Fibonacci series up to the number the user has selected