[Tutor] meaning of % in: if n % x == 0:

Hugo Arts hugo.yoshi at gmail.com
Thu Sep 1 04:29:32 CEST 2011


ah, my mistake. I was in a hurry writing that post, which is a really
bad idea :/

On Thu, Sep 1, 2011 at 2:09 AM, Steven D'Aprano <steve at pearwood.info> wrote:
> Hugo Arts wrote:
>
>>  n % y == 0 if n is divisible by y. This is useful in factoring prime
>> numbers
>
> If you find a way to factor *prime numbers*, you're doing something wrong.
>
> :)
>
> (By definition, a prime number has no factors apart from itself and one,
> which are trivial.)
>
> You mean, factorising numbers into the product of primes.
>
>
>
> --
> Steven
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>


More information about the Tutor mailing list