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

southpaw118

I'm using Linux Mint 14 (Nadia) and Python 2.7.3. I can't get that 'Cube Root of a Perfect Cube" program working. It prompts me to enter an integer and when I do and hit enter, I go right back to the prompt. Anyone else with this problem?

  • 7 months ago
  • 7 months ago

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

    Did you try tossing in some print statments?

    • 7 months ago
  2. harsimran_hs4
    Best Response
    You've already chosen the best response.
    Medals 0

    yes e.mccormick is right , to print something on screen you need to insert print statements in your code Going back to the prompt without error means that program executed properly(even tough in this case did not gave the desired result i.e to print the answer)

    • 7 months ago
  3. southpaw118
    Best Response
    You've already chosen the best response.
    Medals 0

    Thanks a lot. Let me give that a try.

    • 7 months ago
  4. e.mccormick
    Best Response
    You've already chosen the best response.
    Medals 0

    Many programmers will make some sort of console dump or printout to debug things. There are tons of debugging tools, but the basic "print this variable at this instant" method has a serious advantage: It is very easy to do and does not rely on you managing to get the program to stop at just the right moment. I have had a loop print "in loop" at the top just to make sure it was actually looping... found out it was going in, but not looping, traced down the logic error, ran again and got tons of "in loop" messages so I knew that was fixed. Little things like that can be invaluable! So even if you don't print a variable, printing a message would let you know that Python was working.

    • 7 months 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.