Created
November 17, 2010 20:31
-
-
Save wandernauta/704022 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def fib(): | |
seq = [] | |
num1 = 1 | |
num2 = 1 | |
num3 = 0 | |
seq.append(num1) | |
seq.append(num2) | |
seq.append(num3) | |
for i in range(3, 60): # Waar komt die drie vandaan? | |
seq.append(seq[i-2]+seq[i-1]) | |
print seq[2:] # En deze twee? | |
fib() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment