Prime number algo... what's wrong?

L. B. lorenzo at mysurname.net
Sat Mar 22 09:02:41 EST 2003


"Rene Pijlman" <reply.in at the.newsgroup> ha scritto nel messaggio
news:viqo7v85ijk78p4pf5c27iatq2t367v8vg at 4ax.com...
> L. B.:
> >        if test != 0:
> >            x += 1 #still may be prime so go on trying
> >        elif test == 0:
> >            mayP += 1 #is not prime, test the second prime
candidate
> >        else:
>
> Hmmm... so if test is not not 0 and it's not 0, what else can it
> be? :-)

I'll work with the neurons i have left on it! ;-)

Thank You,
Lorenzo






More information about the Python-list mailing list