DIV and MOD
Michael Gilfix
mgilfix at eecs.tufts.edu
Mon Jul 29 10:27:28 EDT 2002
Math module isn't necessary. Just use the '/' and '%' operators
as necessarily. Why does % not work properly in this content?
Python 2.1.3 (#1, Apr 9 2002, 20:09:43)
[GCC 2.95.3 20010315 (release)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> 4 / 3
>>> 1
>>> 5 % 3
>>> 2
-- Mike
On Mon, Jul 29 @ 11:21, Marcus Vinicius Laranjeira wrote:
> I need to use some function like DIV (returns the integer part of a
> division) and MOD (returns the reminder of a division) in python, but I
> don't know how to do that. % does not work as expected (in this context)
> and in the MATH module, I didn't find any kind of function to do such thing.
>
> Can anyone help me ?
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
`-> (m.laranjeira)
--
Michael Gilfix
mgilfix at eecs.tufts.edu
For my gpg public key:
http://www.eecs.tufts.edu/~mgilfix/contact.html
More information about the Python-list
mailing list