Multiplication error in python

Chris Angelico rosuav at gmail.com
Wed Sep 28 03:31:16 EDT 2011


On Wed, Sep 28, 2011 at 4:28 PM, Tim Roberts <timr at probo.com> wrote:
> My guess is that you actually typed
>    p=3*a
> instead of
>    p=2*a
>
> That produces 45.
>

Or alternatively, that you used an interactive Python environment and
didn't clear i between runs.

ChrisA



More information about the Python-list mailing list