ZeroDivisionError: float division (baby steps)
Diez B. Roggisch
deetsNOSPAM at web.de
Thu Aug 19 16:02:22 EDT 2004
I reduced the code to the lines that actually do something with count:
> count= 0
> count= count + 1
> count= count -1
This yields count beeing 0 - thus you get a ZeroDivisionError, as one has to
expect for division by zero....
I'm not totally sure what you actually want, but it seems to me that you
should indent the lines
count= count + 1
sum= sum + number
to the same level as the loop - that will make them part of the loop, so you
actually get some numbers accumulated.
--
Regards,
Diez B. Roggisch
More information about the Python-list
mailing list