On Feb 19, 2:05 pm, 7stud <[EMAIL PROTECTED]> wrote: > An integer divided by an integer produces an integer. In computer > programming, that's called 'integer arithmetic', and any fractional > part of the result is chopped off(not rounded).
In case you care, the "chopped off" bit is given by the modulo operator '%'. So integer division x/y is really like the everyday y goes into x, p times, remainder q, for example: >>> 10/3, 10%3 (3, 1) > If your arithmetic > involves at least one float, then you will get a float as an asnwer: > > print 255/494 > print 255.0/494 > print (255 * 1.0)/494 or indeed "print float(255)/494" -- http://mail.python.org/mailman/listinfo/python-list