Trying to break it down can help a lot: how would you check to see if a particular number (something small, maybe 5 or 6) was prime or not? If you write out the steps, just in plain English, that can be a roadmap for what you have to translate into code. Once you know how to check to see if a particular number is prime, you'd want to figure out how to generalize the steps so you can check to see if any given number is prime. To figure out the nth prime number, you just need a way to keep track of the ones you already know and count the length of the list.
And this:
You might think about which integers you need to check as divisors – certainly you don’t need to go beyond the candidate you are checking, but how much sooner can you stop checking?
is a hint that saves a lot of work. If you want to know if 5 is prime, do you need to divide it by 4? If not, why not?
(And I'd say definitely worry about one at a time!)
no subject
And this:
You might think about which integers you need to check as divisors – certainly you don’t need to go beyond the candidate you are checking, but how much sooner can you stop checking?
is a hint that saves a lot of work. If you want to know if 5 is prime, do you need to divide it by 4? If not, why not?
(And I'd say definitely worry about one at a time!)