Message95542
The example starts off with 1 being printed, while the series is
expected to begin with 0 and 1.
The example in 4.6 (defining functions) should have been:
def fib(n):
a, b = 0, 1
while a < n:
print a,
a, b = b, a+b
fib(2000)
0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 |
|
Date |
User |
Action |
Args |
2009-11-20 13:50:32 | rajesh.menon | set | recipients:
+ rajesh.menon, georg.brandl |
2009-11-20 13:50:32 | rajesh.menon | set | messageid: <1258725032.09.0.34838264618.issue7369@psf.upfronthosting.co.za> |
2009-11-20 13:50:30 | rajesh.menon | link | issue7369 messages |
2009-11-20 13:50:29 | rajesh.menon | create | |
|