dkyoseff

Conditional Statements - Exercise / 03. Time + 15 Minutes

Jul 9th, 2022
839
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. hours = int(input())
  2. minutes = int(input()) + 15
  3.  
  4. if minutes > 59:
  5.     hours += 1
  6.     minutes -= 60
  7. if hours > 23:
  8.     hours = 0
  9.  
  10. print(f'{hours}:{minutes:02d}')
  11.  
  12.  
Advertisement
Add Comment
Please, Sign In to add comment