Last active
August 29, 2015 14:05
-
-
Save komuw/0527faa1b95d3d4a4946 to your computer and use it in GitHub Desktop.
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
#python script for fibonacci between 1 and 100 | |
#example: 1,2,3,5,8,13 | |
hold=[] | |
temp1 = 1 | |
temp2 = 2 | |
hold.append(temp1); hold.append(temp2) | |
for i in range(3, 101): | |
temp3 = temp1 + temp2 | |
hold.append(temp3) | |
temp1 = temp2 | |
temp2 = temp3 | |
for i in hold: | |
print i, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment