• anonymous
Intro to CS - Prime Number Problem help I'm auditing the online intro to CS in Python (MIT 6.00) and am strugling with the problem set number 1 on computing the 1000th prime number. I don't feel that I'm very close. I'm open to suggestions. Here's my code thus far... prime_count = 1 primes = (2, ) prime_test = 3 while prime_count <=1000: if prime_test%2 == 1: prime_test += 2 for n in range(3,prime_test/2): if prime_test%n > 0: prime_count += 1 print primes + (prime_test,) The output I get is nothing near prime number. It is
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.

Looking for something else?

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