Skip to content

Instantly share code, notes, and snippets.

@imohitmayank
Created April 16, 2019 17:51
Show Gist options
  • Save imohitmayank/175344a2ceca1004cec74e07d0307c67 to your computer and use it in GitHub Desktop.
Save imohitmayank/175344a2ceca1004cec74e07d0307c67 to your computer and use it in GitHub Desktop.
Fibonacci number
def fib(n):
if n == 0:
return 0
elif n == 1:
return 1
else:
return fib(n-1) + fib(n-2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment