[Tutor] The remainder %

Magnus Lyckå magnus@thinkware.se
Tue Jun 3 09:01:13 2003


At 14:09 2003-06-03 +0200, Guillaume wrote:
>Hello,
>I'm not very good in maths and I don't understand why
>14 % 3 = 2
>Could someone explain me this mystery?
>Thanks in advance :)

Bill, Ken and Bud have 14 toy cars. If they divide them between
each other, they will get three each, and two will be left over.
That's the reminder. (Sarah can have them. They are broken anyway.
;)

(I guess you were taught this before you were taught fractions in
school. Have you forgotten all from third grade? ;)

Maybe it's unfortunate that the percent-sign is used for
reminders, since reminders have nothing to do with percentages.

There is really no support in any programming lanugage that I
know of for mathematics of the sort "What is 575 plus 10%". I
suppose all programming language designers assume that it's
obvious that "plus 10%" really means "multiplied with 1.1". ;)

But I guess there is really no clear notation for percentages that
work for arbitrary expressions.


--
Magnus Lycka (It's really Lyckå), magnus@thinkware.se
Thinkware AB, Sweden, www.thinkware.se
I code Python ~ The Agile Programming Language