Question: 1. (8 points) Write Python code to define the following function. Use pythontutor.com to check that your code does what it should. Submit a screenshot

 1. (8 points) Write Python code to define the following function.

1. (8 points) Write Python code to define the following function. Use pythontutor.com to check that your code does what it should. Submit a screenshot of your code and the output of the four examples as a pdf to Gradescope. Suppose you are taking a class that has quizzes due on Friday nights at 9 pm and homework due on Monday nights at 10 pm. Given a day of the week encoded as 0=Sun, 1=Mon, 2=Tue, ...6=Sat, and a boolean indicating if you are on break, return a string of the form "9:00" indicating when your assignment is due. On Fridays the string should be "9:00" and on Mondays it would be "10:00". Every other day it should be 'off". Unless we are on break then it should always be "off". Examples: workDue(2. False) "off workDue(1, True) off workDue(1. False) 10:00 workDue(5, False) 9:00 def workDue( day, on Break)

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!