Minutes to Hours
Python
15 pts
Minutes to Hours
A bus trip from Asmara to Massawa took 200 minutes.
- Create
hours: the number of whole hours, using//. - Create
minutes: the minutes left over, using%. - Print them as shown.
Expected output:
3 hours 20 minutes
Checklist
- Keep
total_minutesunchanged and createhours, the number of whole hours, with//. - Create
minutes, the minutes left over, with%. - Print the result as
3 hours 20 minutes.
🔑 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.
