[Tutor] prime test problem

Robert Berman bermanrl at cfl.rr.com
Sat Aug 21 15:44:56 CEST 2010

Googling 'computing prime numbers' produced about 64,100,000 results . That
should certainly get you started.




From: tutor-bounces+bermanrl=cfl.rr.com at python.org
[mailto:tutor-bounces+bermanrl=cfl.rr.com at python.org] On Behalf Of Roelof
Sent: Saturday, August 21, 2010 9:36 AM
To: tutor at python.org
Subject: [Tutor] prime test problem


I have to make a programm which can test if a number is a prime.
I know a prime is a number which can only be diveded by 1 and itself.
One way is was thinking about is to make a loop which try if % has output 0.
But that don't work.
Can someone give me a hint what's the best approach is.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100821/f15ec75f/attachment.html>

More information about the Tutor mailing list