administrata wrote:
Hi! it's been about a week learning python!
I've read 'python programming for the absolute begginer'
I don't understand about % like...

107 % 4 = 3
7 % 3 = 1

I'm confused with division :/
Please help me...

thx 4 reading.

% means modulus, which is simply, the remainder of A divided by B so:

7 % 3 = 1

because only two threes go into seven, leaving 1 remainder. Modulus only returns that remainder.

And 107 % 4 = 3 because 26 4's go into 107 leaving 3 over.

Make sense?

Enoch.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to