Skip to content

Instantly share code, notes, and snippets.

@zachelko
Created May 2, 2010 02:02
Show Gist options
  • Save zachelko/386832 to your computer and use it in GitHub Desktop.
Save zachelko/386832 to your computer and use it in GitHub Desktop.
def fibonacci(nthTerm):
if nthTerm < 2:
return nthTerm
else:
return fibonacci(nthTerm - 1) + fibonacci(nthTerm - 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment