Question: Write a function named work _ or _ sleep that takes a day of the week as input, with first letter capitalized If it is

Write a function named work_or_sleep that takes a day of the week as input, with first letter capitalized
If it is a weekday, the function returns 'work'
If it is a weekend, the function returns 'sleep'
If the input is not a proper day the function returns 'enter a valid day of the week!'
Hint: Use in and lists containing weekdays ("Monday", "Tuesday", etc) and weekends ("Saturday", "Sunday")

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!