[Tutor] Simple variable type question
alan.gauld at btinternet.com
Fri Feb 5 21:39:09 CET 2010
>>>> return float(y2-y1/x2-x1)
>Alan why are you suggesting this, surely this will cause the decimal values to be truncated? Or does this somehow work differently in Python 3?
It would work different in v3 because / is no longer interger division.
However, I just misplaced the ) It should have been after y1.
Sorry about that.
More information about the Tutor