Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

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_2

Step: 3

blur-text-image_3

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

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions