Program of the Day #11

This problem builds on POTD 10. Today’s program takes two times of day, expressed in 24-hour hh:mm:ss format, and prints the elapsed time between them, expressed in total seconds. To accomplish this, you will implement two new functions:

The main program has been written for you. Note that the main program makes use of the print_hms function from P10, so you’ll need P10_hms.py in the same directory as your P11_timediff.py file so the function from P10 can be imported.

Here’s an example run of the program, with input times 10:04:04 and 12:03:00:

>>> %Run P11_timediff.py 10 04 04 12 03 00
01:58:56

Other Practice Problems

None! Check out the problems from Lecture 10 for practice with writing your own functions.