Question: BlockPy: #34.4) Wrong Return The function get_front_of_weekdays consumes a string representing a day of the week, and returns weekend if it is a Sunday or

BlockPy: #34.4) Wrong Return The function get_front_of_weekdays consumes a string representing a day of the week, and returns "weekend" if it is a Sunday or Saturday, or returns the day without the "day" part at the end. However, it does not seem to be returning the right values. Diagnose the issue and fix the function Server: Saved Execution Idle Feedback: Instructor Feedback I ran your function get_front_of_weekdays on some new arguments, and it failed 3/5 tests Console Monday is weekend Sunday is weekend Friday is weekend Arguments Returned weekend weekend weekend weekend Expected 'monday" mon Xriday" 'fri' thurs weekend thursday" saturday Run Blocks Split / Text Reset O Upload -2 History 2 def get_front_ of_weekdays (day): day.lower).replace( "day", "") if day in ["mon", "tues" "wed", "thurs", "fri": 4 return day else: return "weekend" 8 print("Monday is", get_front_of weekdays ("Monday")) 9 print ( "Sunday is", getfront_of_weekdays ( "Sunday")) 10 print ("Friday is", get front of weekdays ("Friday "))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
