vaboro
  • vaboro
I am reading the book "How to think like a computer scientist" by Allen Downey, Jeffrey Elkner and Chris Meyers. When I read chapter 13 I typed the code from the book into the interpreter: time = Time () time.hours = 11 time.minutes = 59 time.seconds = 30 And then I typed: print Time I got the following system output: >>> print Time __main__.Time Then I tried: print time And the system output was this: >>> print time <__main__.Time instance at 0x17635d0> Can somebody explain to me what's going on? Thank you!
MIT 6.00 Intro Computer Science (OCW)
jamiebookeater
  • jamiebookeater
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions

vaboro
  • vaboro
I forgot to mention, of cause, that I created a class by typing the following in the very beginning: class Time(): pass Everything else in my initial message followed.
vaboro
  • vaboro
I figured it out! "print time" prints the instance; whereas "print Time" prints the class nice

Looking for something else?

Not the answer you are looking for? Search for more explanations.