Hello! I just finished the very first problem on problem set 1 thanks to you guys. What do you think of the code I wrote? I am a starter. I would like to know if I am on the right direction or developing some bad habit. Any advice would be greatly appreciated
candidates=range(3,10000,2)
prime=()
i=0
while (i<4999):
x = 2
dec=0
while (x0:
i=i+1
else:
prime=prime+(candidates[i],)
i=i+1
print prime[998]
and I got the right answer which is 7919. Thanks in advance!

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.