[N00B] What's %?
Jeremy Jones
zanesdad at bellsouth.net
Thu Feb 10 12:49:52 EST 2005
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.
>
>
% is the remainder operator (I think it's also called modulus).
107 % 4 == 3
because
107 / 4 == 26 R3
and 7 % 3 == 1
because 7 / 3 == 2 R1
HTH,
Jeremy Jones
More information about the Python-list
mailing list