[Tutor] Modulus Operator ?

Danny Yoo dyoo at hashcollision.org
Fri Nov 20 00:45:08 EST 2015


On Thu, Nov 19, 2015 at 1:11 PM, Ken Hammer <kfh777 at earthlink.net> wrote:

> y = 49%13
> print y
> 10

Actually, let me pretend for a moment that I don't know what the
modulus operator is.  Why do we get 10 here?  Can you verbalize the
reason?


Can you modify this example above to use the modulus operator with
"10" on the right hand side?  What do you expect it computes?  What do
you see?


More information about the Tutor mailing list