[Tutor] SOLVED and thank you was: Re: meaning of % in: if n % x == 0:

Lisi lisi.reisz at gmail.com
Thu Sep 1 16:30:26 CEST 2011


This was meant to go to the list.  I did notrealise that it had not until I 
looked at the list just now and couln't see my reply.  Sorry, "delegbede", 
and sorry list.

On Wednesday 31 August 2011 Lisi wrote:
> ??  If either n or x or both were 0, and % were the same thing as *, the
> statement would be true, but from the context I don't think that % does
> mean the same as *, because * appears very soon after in the same fragment
> of code.

On Wednesday 31 August 2011 20:59:05 delegbede at dudupay.com wrote:
> % is a remainder division. I think its called modulo.

Yes!  Thank you. :-) 

I ought to have been able to guess that it was modulo - shows that I am indeed 
becoming slow-witted. :-(

Thank you, all three of you, for such fast and helpful responses.

Lisi


More information about the Tutor mailing list