A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

anonymous

  • 4 years ago

PS9:#3 I'm a bit confused by the output from classes. for example, if I write x = Circle(5), and then I ask for x.area, I get a msg <bound method Circle.area of <__main__.Circle object at 0x0000000002891940>> 1) what's going on? 2) how do I get say a float value from the <bound method>?

  • This Question is Closed
  1. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    what video lession does this correspond with?

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

    PS9 is due after lecture 16, before lecture 17

  3. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    ok lest me skim through the lession and see if i can help

  4. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    figured it out

  5. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    ok well sorry i wasnt much of any help haha

  6. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    nope, that doesn't work

  7. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    ok game on

  8. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    is that the only part of the code you have written? if not can i see the rest of the code?

  9. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Now I really did figure it out. It was just syntax. I need to write it as x.area() not x.area

  10. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    ah a commen mistake, glad you figured it out good luck :)

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

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.