A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

anonymous

  • 5 years ago

I don't know how to even start prob. set 1... need help.

  • This Question is Closed
  1. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Think about all the steps you need to perform and write it out here in normal english.

  2. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Not sure but here goes, First, I need to create variable--- maybe… x Then, I would assign value to them--- x = 1000 After that, create a “for loop”--- for candidate in range(0,x): if candidate%2 != 0: # makes sure candidates are prime print “prime number”, candidate #prints out the primes Now, I know I need to figure out if a prime is the 100th prime, and that's where I'm having a hard time. Maybe create a counter that let's me know that I computed to the 1000th prime, but I think I attempted that when I created the variable x and assigned the 1000 integer to it, although it's most likely poor (and wrong) attempt at it. Thanks dhatraditya for your help.

  3. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    * opps-- the "for loop" should be for candidate in range(1,x):

  4. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    In this case, you will only find primes between 1 and 1000. So your answer will be 997, which is the highest prime between 1 and 1000. What you need to find is the thousandth prime number, not the prime numbers between 1 and 1000

  5. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    so your counter needs to count the number of primes. for x in range (0,1000) check whether candidate is prime if yes: increment x if no: don't increment x

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

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.