AllenDowney / ThinkPython2

LaTeX source and supporting code for Think Python, 2nd edition, by Allen Downey.
Other
2.49k stars 1.65k forks source link

Unclear Question #91

Open Bob-Builderson opened 2 years ago

Bob-Builderson commented 2 years ago

I love the book. It has really been amazing. Especially the example questions. There was just one that was very unclear to me.

"Exercise 17.1. Download the code from this chapter from http: // thinkpython2. com/ code/ Time2. py . Change the attributes of Time to be a single integer representing seconds since midnight. Then modify the methods (and the function int_totime) to work with the new implementation. You should not have to modify the test code in main. When you are done, the output should be the same as before. Solution: http: // thinkpython2. com/ code/ Time2 soln. py ."

If I can't modify the code in main() then how am I supposed to change the attributes of the Time class? In main() it declares Time objects like "start = Time(9, 45, 00)" If I change the attributes of time, then doesn't that mean that object class declaration will only include one number?