Advertisement
simeonshopov

Sum seconds from book

Sep 17th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. first=int(input())
  2. second=int(input())
  3. third=int(input())
  4. seconds=first+second+third
  5. minutes=0
  6.  
  7. if 10<=seconds<=59:
  8.   minutes=minutes
  9.   seconds=seconds
  10. elif seconds>59:
  11.   minutes = seconds // 60
  12.   seconds=seconds- minutes*60
  13.  
  14. print(f"{minutes}:0{seconds}" if seconds < 10 else f"{minutes}:{seconds}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement