Seconds Converter
Python
25 pts
Seconds Converter
A runner from Keren finished a long race in 7384 seconds. Turn this into hours, minutes and seconds.
hours— whole hours (3600 seconds in an hour).minutes— whole minutes left after taking away the hours.seconds— seconds left after taking away the hours and minutes.
Print the result with one print(). Expected output:
2 h 3 min 4 s
Checklist
- Keep
total_secondsunchanged and createhours, the whole hours. - Create
minutes, the whole minutes left after the hours. - Create
seconds, the seconds left after the hours and minutes. - Print the result with one
print().
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
