Skip to content

Instantly share code, notes, and snippets.

@nickyfoto
Last active April 25, 2019 14:32
Show Gist options
  • Save nickyfoto/ab0c44c9d96ecee7b4c91bec13d7e1c5 to your computer and use it in GitHub Desktop.
Save nickyfoto/ab0c44c9d96ecee7b4c91bec13d7e1c5 to your computer and use it in GitHub Desktop.
Recursively calculate nth Fibonacci number
def fibR(n):
"""recursive fib"""
if n == 0:
return 0
if n == 1:
return 1
return fibR(n-1) + fibR(n-2)
fibR(25)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment