I wrote this program but Python identified an error that I have been struggling to correct. It would be much appreciated if someone could help me identify it.
#This program calculates the 1000 prime
count=1
prime=3
divisor=(prime-2)
while(count<1000):
if((prime)%2)!=0:#tests if prime is odd
while (prime%divisor)!=0 and divisor > 1:#tests if number is prime
divisor=divisor-2
if not prime%divisor!=0:#if number is prime
prime+=2#move onto next odd number
count+=1#advance the count
else prime+=2#syntax error identifid by python here!
print("The 1000 prime is", prime)