question 34 Conditional Logic · medium
Say how long it took
A video app stores how long someone watched in seconds. Show it the way people say it: with an hour or more, hours and minutes (1 h 2 min); under an hour but at least a minute, minutes and seconds (2 min 5 s); under a minute, just seconds (45 s).
First line
seconds = 3725. Check runs your program again with other durationsPrints
1 h 2 minRulethe smaller unit is shown even when it is 0:
1 h 0 min, 1 min 0 sExpected output1 line
- 11 h 2 min