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)) FalseStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started