Ok, so here is my attempt at problem set 1. Can anyone tell me where I went wrong?
import math
number=1
primes = [2]
moduli=[1]
test=3
while number <= 1000:
for prime in primes:
if (test/prime)>=2:
m=test%prime
moduli.append(m)
moduli.sort()
for item in moduli:
if 0==item:
moduli=[]
test=test+2
else:
primes.append(test)
test=test+2
number=number+1
print primes[1000]

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!

it seems that by div/mod by primes results in the code finding primes which actually arent

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.