[Tutor] Prime Factorization Tool

Robert Sjoblom robert.sjoblom at gmail.com
Thu Dec 1 23:48:44 CET 2011


> from math import sqrt
>
> def isprime(n, factor):
>    if n == 1:
>        return False
>    for x in range(2, round(sqrt(n))):
Ooops, this should obviously read
for x in range(factor, round(sqrt(n))):

best regards,
Robert S.


More information about the Tutor mailing list