Skip to content

Instantly share code, notes, and snippets.

@ram0973
Created October 1, 2018 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ram0973/5772318073a27c7302d7f76a06072621 to your computer and use it in GitHub Desktop.
Save ram0973/5772318073a27c7302d7f76a06072621 to your computer and use it in GitHub Desktop.
Fibonacci in python
def fib(n):
if n < 2:
return n
return fib(n - 2) + fib(n - 1)
for i in range(1,30):
print(fib(i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment