Skip to content

Instantly share code, notes, and snippets.

@doper0
Created December 29, 2018 18:56
Show Gist options
  • Save doper0/c193137d2c11df5774576613f009674b to your computer and use it in GitHub Desktop.
Save doper0/c193137d2c11df5774576613f009674b to your computer and use it in GitHub Desktop.
#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)
@doper0
Copy link
Author

doper0 commented Dec 29, 2018

Shows the Fibonacci series up to the number the user has selected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment