Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 : Are you available to meet? Write code that, for a given day and time, sets result to True if you are available

Question 1: Are you available to meet?
Write code that, for a given day and time, sets result to True if you are available to meet on that day and time, and False if you are not. Your calendar is provided in a dictionary called calendar. The keys in this dictionary are your work days: Monday through Friday. The value for each key is the interval of time when you are available to begin a meeting. So, for example, calendar['Monday']=[8,12] means that you are available to start a one-hour meeting on Mondays any time between 8am and 12 noon (inclusive), and not outside of those hours.
The cell below has some starter code for you to work with. Once you are satisfied with your code, you can copy-paste it into the autograded function called available in the following cell.
Note:
We are using a 24-hour clock format, so 15 corresponds to 3 p.m.
Your code should return False if the provided key is not in the calendar dictionary.
Hint: You can check whether the provided day is a key in the dictionary with calendar.keys() and the membership operator in.

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

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

More Books

Students also viewed these Databases questions

Question

What are the determinants of cash cycle ? Explain

Answered: 1 week ago

Question

What types of intervention do your different clients need from you?

Answered: 1 week ago

Question

Understanding of the different individuals and their background

Answered: 1 week ago