Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear Question #91

Open
ghost opened this issue Apr 18, 2022 · 0 comments
Open

Unclear Question #91

ghost opened this issue Apr 18, 2022 · 0 comments

Comments

@ghost
Copy link

ghost commented Apr 18, 2022

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_to_time) 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants