Skip to content

Instantly share code, notes, and snippets.

@afaqk9394
Created November 3, 2019 05:36
Show Gist options
  • Select an option

  • Save afaqk9394/379001dfd163ae9508075cc67f8bc878 to your computer and use it in GitHub Desktop.

Select an option

Save afaqk9394/379001dfd163ae9508075cc67f8bc878 to your computer and use it in GitHub Desktop.
fibonacci
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