Code for assignment 4 is given below # Created the function…

Question Answered step-by-step Code for assignment 4 is given below # Created the function… Image transcription text11:27 PM Zr ‘9’ y L; .ull .ull ’59 — 6 IIEIZI The week 8 final project involves creating aPython program that builds on the assignments for weeks 3 and 4. In addition tothe house cleaning service from the previous assignments, the comp… Show more… Show moreImage transcription text11:27 PM Z ‘9’ y L; .ull .ull ’59 — 6 IIEIZI Seniors receive a discount on both services.You decide the discount amount, which can be either a percentage or a fixed dollaramount. You also decide how to prompt the user, either by requesting… Show more… Show moreImage transcription text11:27 PM Zr ‘9’ y L; .ull .ull ’59 — 6 IIEIZI The week 8 final project involves creating aPython program that builds on the assignments for weeks 3 and 4. In addition tothe house cleaning service from the previous assignments, the comp… Show more… Show moreCode for assignment 4 is given below# Created the function cost_cleaning, and using size for number of rooms, and type_cleaning for type of cleaning as parametersdef cost_cleaning(num_rooms, type_cleaning):   # Types of cleaning initialization, Here we are offering three types of cleaning   dusting = 60   window_washing = 80   # Initializing a variable total to calculate the cost of cleaning   total = 0   # Using if-else structure to calculate the cost of the cleaning, If the type of cleaning is dusting than the if statement will execute, If it is window_washing then the elif  will execute   if type_cleaning == “dusting”:       total = num_rooms * dusting   elif type_cleaning == “window_washing”:       total = num_rooms * window_washing   # returning the total cost on the screen   return total# Main functiondef main():   # Taking input from the user of number of rooms in the house and type of cleaning   num_rooms = int(input(“Please Enter the number of rooms in the house:”))   type_cleaning = input(“Please Enter the type of cleaning you want(dusting or window_washing) cleaning:”)   # Calling the function cost_cleaning and passing the parameters size and type_cleaning to it   total = cost_cleaning(num_rooms, type_cleaning)   # Printing the total cost on the screen   print(“Total cost of cleaning:”, total)# Calling the main functionmain()  Computer Science Engineering & Technology Python Programming IT CSE6 Share QuestionEmailCopy link Comments (0)