Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exam_hour = int(input())
- exam_min = int(input())
- hour_arrival = int(input())
- min_arrival = int(input())
- exam_time_min = (exam_hour * 60) + exam_min
- arrival_time_min = (hour_arrival * 60) +min_arrival
- diff = abs(exam_time_min-arrival_time_min)
- if exam_time_min < arrival_time_min:
- print("Late")
- if diff < 60:
- print(f"{diff} minutes after the start")
- elif diff >= 60:
- hour = diff // 60
- min = diff % 60
- if min < 10:
- print(f"{hour}:0{min} hours after the start")
- else:
- print(f"{hour}:{min} hours after the start")
- elif exam_time_min == arrival_time_min or diff <= 30:
- print("On time")
- if diff >=1 and diff <=30:
- print(f"{diff} minutes before the start")
- else:
- print("Early")
- if diff < 60:
- print(f"{diff} minutes before the start")
- elif diff >= 60:
- hour = diff // 60
- min = diff % 60
- if min < 10:
- print(f"{hour}:0{min} hours before the start")
- else:
- print(f"{hour}:{min} hours before the start")
Advertisement
Add Comment
Please, Sign In to add comment