Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Code:
- number = int(input('Give me number of minutes, and I will tell you how many hours and minutes it is.'))
- if number > 60:
- hours = int(number/60)
- minutes = (number%60)
- string = hours, ':', minutes
- print (hours, ":" ,minutes)
- print (string)
- Result:
- >>> ================================ RESTART ================================
- >>>
- Give me number of minutes, and I will tell you how many hours and minutes it is.588
- 9 : 48
- (9, ':', 48)
- >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement