Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

StudentTeacher Group Title

I'm feeling very inspired yet slightly inept. These MIT courses are very inspiring to me, but i did not have any sense of how to programatically solve the 1000th prime program from watching the video and seeing the PDF assignment. That made me feel a bit inept as i was reading the forum and seeing that people were like these are the values and this is how you run the loop to the 1000th prime. I felt like i missed some of the material. I'm confused on the statement i saw in the forum - for x in range(2, 11, testnumber): Can someone explain that?

  • 2 years ago
  • 2 years ago

  • This Question is Closed
  1. maitre_kaio Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    You don't have to feel inept. As any other field of the human knowledge, some people are more inclined to understand it than others, but anyone can make it to a decent level if he perseveres and keeps asking for help. (Oh, what a wonderful sentence I made! Since I'm french, I hope it makes sense in English too :-) ). So, I don't know where you took this example from, but that's what that "for x in range(2, 11, testnumber)' means: I want a variable x to enumerate through all the values starting with 2, up to 11, with a step which is the value of the variable testnumber. And for each different value of x, I want to make a process defined inside the for loop (else my loop is completely useless). You could try this program to visualize the result: testnumber = 1 for x in range(2, 11, testnumber): print x And give to testnumber different values, just to see the results.

    • 2 years ago
  2. bwCA Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    there are readings as well as lectures - they are a must - there is a link in the upper left section of the course maon page. The Tutorial in the Python documentation is indispensable - the documentation should have been installed on your computer. http://docs.python.org/tutorial/index.html How to think like a computer Scientist is a good start

    • 2 years ago
  3. StudentTeacher Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Thanks for the support! I have some programming experience from work and was frustrated after trying to solve the problem from lecture 2. After watching Lecture 3 I felt a bit better as people in the class didn't have answers for the teacher as he was asking for solutions to one of his problems. I am trying to get some of my fundamentals learned. As i look at code sometimes i just see things i don't get and that havn't been explained to me from the class videos . I will keep trying. I love the fact that many of the coding ideas i have other people have thought about and amazingly they are often willing to help others!!!

    • 2 years ago
  4. student47 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    feel easy.

    • 2 years ago
    • Attachments:

See more questions >>>

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.