Skip to content

Instantly share code, notes, and snippets.

@mindjiver
Created April 26, 2011 19:16
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 mindjiver/942888 to your computer and use it in GitHub Desktop.
Save mindjiver/942888 to your computer and use it in GitHub Desktop.
Trappajävel
#!/usr/bin/env python
def f(n):
if n < 0: return 0
if n == 0: return 1
return f(n - 1) + f(n - 2)
for i in range(0, 10):
print str(i) + " : " + str(f(i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment