Question: In Python 3 Write a function, enough_Time(h, m, h2, m2), that takes 4 integer parameters: hours_1, minutes_1, hours_2, minutes_2. These parameters represent two 24-hour times.

In Python 3
Write a function, enough_Time(h, m, h2, m2), that takes 4 integer parameters: hours_1, minutes_1, hours_2, minutes_2. These parameters represent two 24-hour times. For example, the two times 4:35 PM and 7:20 will be represented by the following parameters: (16, 35, 19, 20). The function should return True if the gap between the two times is enough for a nap (greater than 40 minutes). It should return False otherwise. You may assume all parameters are valid, and both times represent times in the same day. If the second time is earlier than the first one, your function should return False.
For example: Test Result print(enough_Time (10, 0, 10, 55)) print(enough_Time (18, 20, 17, 30)) False print(enough_Time (14, 30; 15, 0)) False
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
