Re: [Tutor] Basic terminology

2005-02-15 Thread Bernard Lebel
Well, thanks everyone who answered, much clearer now. Bernard Max Noel wrote: In a slightly more generic fashion (everybody started dropping examples), the goal of an integer (euclidian) division (say, a / b) is to express an integer as such: a = b * quotient + remainder Where all the n

Re: [Tutor] Basic terminology

2005-02-15 Thread Max Noel
In a slightly more generic fashion (everybody started dropping examples), the goal of an integer (euclidian) division (say, a / b) is to express an integer as such: a = b * quotient + remainder Where all the numbers used are integers, and 0 <= remainder < b. When you perform integer di

Re: [Tutor] Basic terminology

2005-02-15 Thread Bill Mill
On Tue, 15 Feb 2005 14:26:52 -0800 (PST), Da > > Hi Bernard, > > Another familiar example of modulo is checking to see if a number is even > or odd: > Since Danny got it started with the examples, I'll give another canonical example of the use of the modulus operator. Imagine that we're trying

Re: [Tutor] Basic terminology

2005-02-15 Thread Danny Yoo
> A remainder is what's left over after a division: > > 10/3 = 3 remainder 1 > 12/5 = 2 remainder 2 > 27/3 = 9 remainder 0 > > and the modulus operator (which is % in python) gives you that remainder: > > 10%3 = 1 > 12%5 = 2 > 27%3 = 0 Hi Bernard, Another familiar example of modulo is checking

Re: [Tutor] Basic terminology

2005-02-15 Thread Bill Mill
A remainder is what's left over after a division: 10/3 = 3 remainder 1 12/5 = 2 remainder 2 27/3 = 9 remainder 0 and the modulus operator (which is % in python) gives you that remainder: 10%3 = 1 12%5 = 2 27%3 = 0 See http://mathworld.wolfram.com/Remainder.html and http://mathworld.wolfram.com/