abhishekjain.cooldude.93 at gmail.com
Sun Aug 14 14:36:45 CEST 2011
I wrote a python program to find the 1000th prime no. The program isn't
working as it should be.
Please tell what the error is:
## this is to find the 1000th prime number
number = 3
while number < 10000:
counter = 1
###initializing list to check primarity
factor = 
if number % counter == 0:
factor = factor + [counter]
counter = counter + 1
if len(factor) > 1:
elif counter == 1000:
The program is printing all the prime nos. from 1009 to 9973. Please respond
fast and give me the correct code with only simple functions as i am a
beginner to python.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list