Skip to content

Instantly share code, notes, and snippets.

@Senix
Created May 27, 2011 21:25
Show Gist options
  • Save Senix/996211 to your computer and use it in GitHub Desktop.
Save Senix/996211 to your computer and use it in GitHub Desktop.
#!/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
print
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