Skip to content

Instantly share code, notes, and snippets.

@Veedrac
Created July 1, 2015 00:31
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 Veedrac/91f47e67ea0459564d04 to your computer and use it in GitHub Desktop.
Save Veedrac/91f47e67ea0459564d04 to your computer and use it in GitHub Desktop.
def fibonacci(n):
if n == 0:
return 0
elif n == 1:
return 1
else:
return fibonacci(n - 1) + fibonacci(n - 2)
def fibonacci(n):
if n == 0:
return 0
elif n == 1:
return 1
else:
ret = 0
ret += fibonacci(n - 1)
ret += fibonacci(n - 2)
return ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment