Hello Guys,
I'm a very beginner in computer science.I have trouble solving this problem--find the 1000th prime. i have tried a lot of time,but can not write working code.
the following is one of the code i tried, still not working, can anyone help me with the finding prime problem? thanks
candidate=3
a=[]
prime=[]
for i in range(2,candidate):
b=candidate%i
c=a.append(b)
if 0 in c:
candidate+=2
else:
final_prime=prime.append(candidate)
candidate+=2
while len(final_prime)=999:
Final_prime=[2]+final_prime
print Final_prime

Hey! We 've verified this expert answer for you, click below to unlock the details :)

I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!

Looking for something else?

Not the answer you are looking for? Search for more explanations.

## More answers

Looking for something else?

Not the answer you are looking for? Search for more explanations.