Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2 ( 2 5 Points ) : Consider you recently started a restaurant which opens from 8 . 0 0 AM to 9 .

Question 2(25 Points): Consider you recently started a restaurant which opens from 8.00AM to 9.00PM, Sunday to Friday. Write a python program that does the following:
I. Take input of day as integer. Here, Monday =1, Tuesday =2,dots. Sunday =7.
II. Take the time (in hour) input in 24-hour format. In 24-hour format 10 means 10AM and 20 means 10PM.
III. Determine whether the restaurant is open or close at the time and date.
Check the following sample Input/Output for understanding.
Sample Input 1:
Input Day: 4
Input Time: 17
output: restaurant is open.
Sample Input 2:
Input Day: 4
Input Time: 22
Output: restaurant is close.
You must test the following two test cases with your code and attach the output.
Sample Input 1:
Input Day: 6
Input Time: 14
output: ???
Sample Input 2:
Input Day: 5
Input Time: 13
Output: ????
image text in transcribed

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

More Books

Students also viewed these Databases questions

Question

What are the major principles contained in the IIAs Code of Ethics?

Answered: 1 week ago

Question

4. Support and enliven your speech with effective research

Answered: 1 week ago

Question

3. Choose an appropriate topic and develop it

Answered: 1 week ago