diveintomark/diveintopython3 — Issue #5: 7.5 A Fibonacci Iterator - Error
Author: spengilley
Created: 2012-02-23 19:22:49+00:00
State: open

Hi Mark,

Excellent book. Really enjoying Python!

I have a problem with the above class. It returns zeros!

I have copied the code from this website and processed it with

for n in Fib(1000):
print(n, end=' ')

I get output 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Any ideas?