Hello all,<br><br>I wrote a python program to find the 1000th prime no. The program isn't working as it should be.<br>Please tell what the error is:<br><br>## this is to find the 1000th prime number<br><br>number = 3<br>
while number < 10000:<br>    ###initialize stuff<br>    counter = 1<br>    ###initializing list to check primarity<br>    factor = []<br>    while counter!=(number/2): <br>        if number % counter == 0:<br>            factor = factor + [counter]<br>
        counter = counter + 1        <br>        if len(factor) > 1:<br>            break<br>        elif counter == 1000:<br>            print number,   <br>number+=1<br><br><br><br>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.<br>