On Jan 12, 10:15 pm, Odysseus <[EMAIL PROTECTED]> wrote:
> P.S. Is there a preferable technique for forcing floating-point division
> of two integers to that used above, multiplying by "100.0" first?
Put this at the beginning of your program:

    from __future__ import division

This forces all divisions to yield floating points values:

    >>> 1/3
    0
    >>> from __future__ import division
    >>> 1/3
    0.33333333333333331
    >>>

HTH,
--
Roberto Bonvallet
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to