A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing


  • 3 years ago

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

  • This Question is Closed
  1. slotema
    • 3 years ago
    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.

  2. diomit
    • 3 years ago
    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 !

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


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