>>>>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? > It would work different in v3 because / is no longer interger division. However, I just misplaced the ) It should have been after y1. return float(x1-y1)/(x2-y2) Sorry about that. Alan G. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
- [Tutor] Simple variable type question Antonio de la Fuente
- Re: [Tutor] Simple variable type question Wayne Werner
- Re: [Tutor] Simple variable type question Sander Sweers
- Re: [Tutor] Simple variable type question Luke Paireepinart
- Re: [Tutor] Simple variable type question Alan Gauld
- Re: [Tutor] Simple variable type question Luke Paireepinart
- Re: [Tutor] Simple variable type questio... ALAN GAULD
- Re: [Tutor] Simple variable type que... Sander Sweers
- Re: [Tutor] Simple variable typ... Alan Gauld
- Re: [Tutor] Simple variable type question Antonio de la Fuente