• anonymous
can somebody help me with PS1? I keep getting Memory Error.... Thanks! n = 1000 n = n - 1 # not counting 2 (the only even prime) counter = 1 prime = 3 # 3 is 2nd prime divisor = [2, ] answers = [] while counter <= n: for div in divisor: ans = prime % div answers.append(ans) if sum(answers) != 0: counter = counter + 1 divisor.append(prime) answers = [] # reset answers list to 0 elements prime = prime + 2 # next odd number (after 2, all primes are odd print prime
MIT 6.00 Intro Computer Science (OCW)
• Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Looking for something else?

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