Working on a program in python to print out the first 1000 prime numbers (except 2). all i can get for the output is the number 3. don't understand where or when my loop is ending. very new at programming. can anybody help?
primeCounter = 1
candidate = 3
while primeCounter < 1000:
isPrime = True
counter = 2
while counter < candidate:
if candidate%counter == 0:
isPrime = False
else:
counter = counter + 1
if isPrime == True:
print candidate
primeCounter = primeCounter + 1
candidate = candidate + 1