[Tutor] Simple variable type question
Alan Gauld
alan.gauld at btinternet.com
Sat Feb 6 00:44:56 CET 2010
"Sander Sweers" <sander.sweers at gmail.com> wrote
> On vr, 2010-02-05 at 20:39 +0000, ALAN GAULD wrote:
>> return float(x1-y1)/(x2-y2)
>
> Does not work properly in version 2. Example is the 3rd doc test:
> float((3-2)/(3-1)) gives 0.0 instead of 0.5.
That's what I did wrong dfirst time round, I had the parens round
the whole, it should only be round the first expression.
Alan G.
More information about the Tutor
mailing list