Re: [Tutor] Fwd: Help on finding the 1000th prime

2009-11-16 Thread Shashwat Anand
You'r trying naive algorithm. Finding prime is one of basic elements of maths and programming. You may look at sieve of eratosthenesand sieve of atkin On Tue, Nov 17, 2009 at 3:35 AM, wrote: > > > Ke

Re: [Tutor] Fwd: Help on finding the 1000th prime

2009-11-16 Thread christopher . henk
Kent Johnson wrote on 11/16/2009 04:00:02 PM: > -- Forwarded message -- > From: Ray Holt > Date: Mon, Nov 16, 2009 at 1:55 PM > Subject: RE: [Tutor] Help on finding the 1000th prime > To: Kent Johnson > > > I hit the send button before I was ready. Here is the code that doesn'

Re: [Tutor] Fwd: Help on finding the 1000th prime

2009-11-16 Thread Modulok
Also watch things like letter case on stuff like 'Print' and 'While', they should instead be 'print' and 'while', (all lowercase). -Modulok- On 11/16/09, bob gailer wrote: > >> Here is the code that doesn't work. >> > > Thanks for posting the code. What "doesn't work" mean? > error messages? > u

Re: [Tutor] Fwd: Help on finding the 1000th prime

2009-11-16 Thread bob gailer
Here is the code that doesn't work. Thanks for posting the code. What "doesn't work" mean? error messages? unexpected results? or what? There are several problems in your code. - The candidates you are testing. Walk thru the program and list a few of them and see if you can determine that

[Tutor] Fwd: Help on finding the 1000th prime

2009-11-16 Thread Kent Johnson
-- Forwarded message -- From: Ray Holt Date: Mon, Nov 16, 2009 at 1:55 PM Subject: RE: [Tutor] Help on finding the 1000th prime To: Kent Johnson I hit the send button before I was ready. Here is the code that doesn't work. primeCount = 0 primeCandidate = 2 While primeCount <= 10

[Tutor] Fwd: Help on finding the 1000th prime

2009-11-16 Thread Kent Johnson
Please use reply all to reply to the list -- Forwarded message -- From: Ray Holt Date: Mon, Nov 16, 2009 at 1:34 PM Subject: RE: [Tutor] Help on finding the 1000th prime To: Kent Johnson Basically I can't figure out how to loop through the possible candidates. I am using versi