IN PYTHON ASAP. Write a program that asks a user to enter two times, that hour and min. Then the program must determine which of the two times come first and produces formatted output on to the console. See the example run of the sample program.
Enter the hour for the first time: 12 Enter the minute for the first time: 32 Enter the hour for the second time: 1 Enter the minute for the second time: 12
The first time is 01:12 The second time is 12:32
#source code:
hour_first=int(input("Enter hour for the first time:"))
minute_first=int(input("Enter the minute for the first time:"))
hour_second=int(input("Enter hour for the second time:"))
minute_second=int(input("Enter the minute for the second time:"))
if(hour_first<hour_second):
print("The first time is {}:{} The Second Time is {}:{}".format(hour_first,minute_first,hour_second,minute_second))
elif(hour_first==hour_second):
if(minute_first<minute_second):
print("The first time is {}:{} The Second Time is {}:{}".format(hour_first,minute_first,hour_second,minute_second))
elif(minute_second<minute_first):
print("The first time is {}:{} The Second Time is {}:{}".format(hour_second,minute_second,hour_first,minute_first))
elif(hour_second<hour_first):
print("The first time is {}:{} The Second Time is {}:{}".format(hour_second,minute_second,hour_first,minute_first))

#output:

#if you have any doubt comment below..
IN PYTHON ASAP. Write a program that asks a user to enter two times, that hour...