Challenge: Minutes to Hours
Completed
Read a number of minutes and show it as hours and minutes.
Input
One whole number: total minutes.
Output
<h> hours and <m> minutes. For 135 print 2 hours and 15 minutes.
Example
Input
135
Output
2 hours and 15 minutes
Editor
Python
Hints
There are 60 minutes in an hour.
// gives the whole hours, % gives the minutes left over.
Solution explanation
total // 60 is the number of full hours and total % 60 is what remains.
Show solution
total = int(input())
print(total // 60, "hours and", total % 60, "minutes")