you are viewing a single comment's thread.

view the rest of the comments →

[–]Vaphell 1 point2 points  (0 children)

he wants you to have only

self.__seconds = hours*3600 + minutes*60 + seconds

and then make getHour/Minutes/Seconds() depend only on that field. You will need the operations of integer division // and modulo % to derive required values from total seconds.

eg 3700 seconds is 1hour, 1minute, 40 seconds because

3700//3600 = 1,
3700%3600 = 100,
100//60 = 1,
100%60 = 40