Created
May 27, 2011 21:25
-
-
Save Senix/996211 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
#!/usr/bin/python | |
a, b = 0, 1 | |
#a, b = b, a + b | |
fibno = raw_input("ready to calculate: ") | |
for i in range(int(fibno)): | |
a, b = b, a + b | |
print b | |
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
ready to calculate: 30 | |
1 | |
2 | |
3 | |
5 | |
8 | |
13 | |
21 | |
34 | |
55 | |
89 | |
144 | |
233 | |
377 | |
610 | |
987 | |
1597 | |
2584 | |
4181 | |
6765 | |
10946 | |
17711 | |
28657 | |
46368 | |
75025 | |
121393 | |
196418 | |
317811 | |
514229 | |
832040 | |
1346269 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment