[Tutor] Simple variable type question
rabidpoobear at gmail.com
Fri Feb 5 20:25:47 CET 2010
On Fri, Feb 5, 2010 at 12:45 PM, Alan Gauld <alan.gauld at btinternet.com>wrote:
> "Antonio de la Fuente" <toni at muybien.org> wrote
>> the doctest for the slope function failed, because is expecting a
>> floating point value and not an integer:
> So convert it to a float.
> Or just
> 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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor