Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help me to fix the given code!! Do not write seperated code you must edit given code to output correctly. Python problems dealing with
Please help me to fix the given code!!
Do not write seperated code you must edit given code to output correctly. Python problems dealing with Scope.
1st problem - Read directions given and feedback. It tries a different argument such as Saturday and comes back wrong (true or false) and is expected to be the opposite. Need it to work for all arguments/ days of week input.
2nd problem - Read directions given and feedback.
BlockPy: #232) Weekend Check The function is_weekend is supposed to consume nothing and return a Boolean indicating whether the current day of the week is a weekend, according to user input. However, it does not work correctly. Fix this function by applying the rules of scope Ex Console What day of the week is today? Monday False Feedbaclk Instructor Feedback Your code did not return the right value when the user entered 'saturday Expected to return: True Actually returned: False Enter Run Blocks Split /Text Reset O Upload- History 1 day-of-week nput ("What day of the week is today?") 2 def is_weekend(): 3 is saturday-(day_of_week.lower) "saturday") 4 is sunday(day of week.lower"sunday" return is saturday or is sunday 6 print (is_weekend())Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started