Advertisement
Guest User

Untitled

a guest
Aug 29th, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. Code:
  2. number = int(input('Give me number of minutes, and I will tell you how many hours and minutes it is.'))
  3. if number > 60:
  4. hours = int(number/60)
  5. minutes = (number%60)
  6. string = hours, ':', minutes
  7. print (hours, ":" ,minutes)
  8. print (string)
  9.  
  10.  
  11. Result:
  12.  
  13. >>> ================================ RESTART ================================
  14. >>>
  15. Give me number of minutes, and I will tell you how many hours and minutes it is.588
  16. 9 : 48
  17. (9, ':', 48)
  18. >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement