Challenge: Fix the Code

Here is a challenge to fix another bug in the code given in the previous lesson

We'll cover the following

Problem statement #

In the code given below, enter 06:09 and 20:0 and observe that the same assert check still fails. Your task is to fix the code so that the assert check does not fail.

Input #

06:09 20:0

Output #

Once the code is fixed, the program should produce the following output:

20 hours and 0 minutes after 06:09 is 02:09.

Challenge #

This problem is designed for you to practice, so try to solve it on your own first. If you get stuck, you can always refer to the explanation and solution provided in the next lesson. Good luck!

Get hands-on with 1400+ tech skills courses.