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

diomit

Hello I made this line of code for the 12.2 in cspy which states : "As an exercise, create and print a Point object, and then use id to print the object’s unique identifier. Translate the hexadecimal form into decimal and confirm that they match.". The code works but only when I write 'print' instead of 'return', the 'print r' statement returns 'None' ?? Could someone explain why to me please ? Thank you code : http://pastebin.com/kDTMiH9Q

  • one year ago
  • one year ago

  • This Question is Closed
  1. slotema
    Best Response
    You've already chosen the best response.
    Medals 0

    In your code, as long as you pass a number that is divisable by 16, something is returned. But if the number is not, which is the case with 39619, you call dectohex again, but you do not return anything.

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

    Thanks a lot slotema ! It works fine with a return statement before the function call !

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