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. Console Feedback Ready Run Blocks SplitText Reset Upload History 1 def get front_of_weekdays(day): 3 day.lower().replace("day", "") if day in ["mon", "tues", "wed", "thurs", "fri: "thurs", ri: return day else: return "weekend" 8, print("Monday is", get-front-of weekdays("Monday")) 9 print("Sunday is", get_front_of_weekdays (" Sunday")) 1e 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
