Complete the following program that finds which of the time points comes last. The time is expressed as "hh:: where hh is the hour (00-23) and mm is the minutes (00-60). timel = "01:00" time2 = "00: 55" hh1, mml = timel.split (":") hh2, mm2 = time2.split (":") if print ("time2 comes last")

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter4: Control Structures I (selection)
Section: Chapter Questions
Problem 20PE: The cost of renting a room at a hotel is, say $100.00 per night. For special occasions, such as a...
icon
Related questions
Question
Complete the following program that finds which of the time points comes last. The time is expressed as "hh: mm
where hh is the hour (00-23) and mm is the minutes (00-60).
timel = "01:00"
time2 = "00: 55"
hh1, mml = timel.split (":")
hh2, mm2 = time2.split (":")
if
print ("time2 comes last")
elif hhl == hh2:
if
print ("time2 comes last")
elif
else:
print ("both times are the same")
else:
print ("timel comes last")
hh1 > hh2
hh1 < hh2
mm1 > mm2
print("time1 comes last")
print("time2 comes last")
mm1 < mm2
Transcribed Image Text:Complete the following program that finds which of the time points comes last. The time is expressed as "hh: mm where hh is the hour (00-23) and mm is the minutes (00-60). timel = "01:00" time2 = "00: 55" hh1, mml = timel.split (":") hh2, mm2 = time2.split (":") if print ("time2 comes last") elif hhl == hh2: if print ("time2 comes last") elif else: print ("both times are the same") else: print ("timel comes last") hh1 > hh2 hh1 < hh2 mm1 > mm2 print("time1 comes last") print("time2 comes last") mm1 < mm2
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning