mlzarathus...@gmail.com writes:

> Yes, I just worked that out. It's the integer math that's the problem.
>
> I guess this has been fixed in python 3 [- -]

Note that division in Python 3 produces approximate results (floating
point numbers). This may or may not be what you want in this exercise.
I would blame this problem entirely on the precedence issue and just do
the multiplication first. The algorithm is pretty neat that way.

(Meta) Also, please leave some relevant context so it's easier to follow
the discussion. It's a general principle, and particularly acute in
comp.lang.python where many messages fail to identify their parent.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to