Created
April 26, 2011 19:16
-
-
Save mindjiver/942888 to your computer and use it in GitHub Desktop.
Trappajävel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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