1 is not prime (Re: a better prime number generator)
Greg Ewing
greg at cosc.canterbury.ac.nz
Wed Oct 24 02:54:16 CEST 2001
Paul Winkler wrote:
>
> # 1 is prime, but we don't want it in the list during the loop
> primes.insert(0, 1)
The way the primes are usually defined, 1 is
not considered prime. So this line should be
removed.
--
Greg Ewing, Computer Science Dept, University of Canterbury,
Christchurch, New Zealand
To get my email address, please visit my web page:
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list