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

sebastianaro

Hi, I'm using python 2.7.3. In the third lecture they hand out one exercise with the Dividors. Python is not showing me the result even with the (i,) correction they did. What's going on? Help?

  • one year ago
  • one year ago

  • This Question is Open
  1. TuringTest
    Best Response
    You've already chosen the best response.
    Medals 1

    the second lecture from edX, or OCW ?

    • one year ago
  2. sebastianaro
    Best Response
    You've already chosen the best response.
    Medals 0

    I made a mistake in my question is actually the 3rd lecture of OCW.

    • one year ago
  3. TuringTest
    Best Response
    You've already chosen the best response.
    Medals 1

    x = 100 divisors = () for i in range(1, x): if x%i == 0: divisors = divisors + (i,) print divisors print divisors[0] + divisors[1] print divisors[2:4] this one?

    • one year ago
  4. sebastianaro
    Best Response
    You've already chosen the best response.
    Medals 0

    Oh yes, is that one, I didn't know you had to actually write print divisors and all the other things.

    • one year ago
  5. TuringTest
    Best Response
    You've already chosen the best response.
    Medals 1

    you don't, just type x = 100 divisors = () for i in range(1, x): if x%i == 0: divisors = divisors + (i,) into a new window, and run with F5. then type the print statements into the shell and hit enter to run

    • one year ago
  6. sebastianaro
    Best Response
    You've already chosen the best response.
    Medals 0

    Thanks so much, now it works. In the handout it did not have print Divisors and the video I couldn't see that there was a print in the code. Thanks so much. I thought there was something wrong with my python. Thanks again! :D

    • one year ago
  7. TuringTest
    Best Response
    You've already chosen the best response.
    Medals 1

    No problem, welcome!

    • one year 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.