Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Semantics In Databases Second International Workshop Dagstuhl Castle Germany January 2001 Revised Papers Lncs 2582

Authors: Leopoldo Bertossi ,Gyula O.H. Katona ,Klaus-Dieter Schewe ,Bernhard Thalheim

2003rd Edition

3540009574, 978-3540009573

More Books

Students also viewed these Databases questions

Question

3. Would you say that effective teamwork saved their lives?

Answered: 1 week ago