Question: Hi i need help with this. Please DON'T USE LOOPS. Thank you! Question 2. Time Difference using a 24 hour clock Write a program which

Hi i need help with this. Please DON'T USE LOOPS. Thank you!

Hi i need help with this. Please DON'T USE LOOPS. Thank you!

Question 2. Time Difference using a 24 hour clock Write a program which calculates the difference in hours and minutes between two times. The two times are given using a 24 hour clock, eg., 21:34 is 34 minutes past 9pm. Copy the following statements which initialise the two times into the start of your program (you will change the values assigned to these four variables when you test your program). timel_hour = 5 timel minute = 23 time2 hour = 23 time2 minute = 14 You can assume that the second time is always later than the first time. Write your program in a file named 'YourUsernameA1Q2.py', e.g., afer023A102.py. Below are three example outputs from the completed program (using different values for the initial four variables). Your program must give the correct output in the same format as the outputs in the three examples below: Hours and minutes from 5:23 to 23:14 is: 17 hours and 51 minutes. Hours and minutes from 11:25 to 15:6 is: 3 hours and 41 minutes. Hours and minutes from 13:32 to 13:36 is: 0 hours and 4 minutes. Once you are happy that your program code executes correctly, copy all the program code into CodeRunner except for the initial four statements which initialise the four variables and press the 'Check' button.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!