Question: In Python, 2) (6 points) Name this python file YourLastNameAlarmTime.py (Example: SpiegelAlarmTime.py) Let the days of the week be equal to the numbers 1 through

In Python,

2) (6 points) Name this python file YourLastNameAlarmTime.py (Example: SpiegelAlarmTime.py)

Let the days of the week be equal to the numbers 1 through 7. For Example: 1=Sunday, 2=Monday, 3=Tuesday, ...7=Saturday, and a boolean variable onVacation, return a string of the form "6:00, meaning when the alarm should go off in the morning.. Weekdays, the alarm should go off at "6:00" and on the weekend it should go off at "9:00". However if it is vacation, then on the weekdays it should go off at 9:00 and on the weekends it should be off.

  1. Determine test cases (complete the table below)

  2. Write the alarmTime function in Python. This function must return a String value as indicated above. Use the function header below.

  3. Write a main function where you print the call to alarmTime using atleast 3 test cases.

Examples: alarmTime(day, onVacation)

alarmTime(2,False) 6:00

alarmTime(7,True) off

alarmTime(2,True) 9:00

Determine Test Cases:

day

onVacation

Result

1

True

off

3

False

6:00

4

True

9:00

7

False

9:00

#Function header

def alarmTime(day, onVacation):

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!