Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you treat this exercise for me by offering me something specific, original, different from those already present on chegg Hide Assignment Information Instructions Once

Can you treat this exercise for me by offering me something specific, original, different from those already present on chegg

Hide Assignment Information

Instructions

Once you have completed your practice final project (if you elected to do so), test your understanding of all the topics in this course by completing and submitting the Python final project provided.

The Week 8 final project involves creating a Python program that builds on the assignments for Weeks 3 and 4. In addition to the house cleaning service from the previous assignments, the company will now offer yard service. Yard service involves mowing, edging, and shrub pruning. The cost of the mowing depends upon the square footage of the yard, the cost of edging depends upon the linear footage of the yard's edges, and the cost of shrub pruning depends upon the number of shrubs.

Your program should begin by asking the customer whether they are requesting house cleaning or yard service. If the user inputs an invalid choice, the user should be re-prompted until a valid choice is entered. Depending upon the choice, the program should then prompt the user for the information needed to determine the cost of the service.

Seniors receive a discount on both services. You decide the discount amount, which can be either a percentage or a fixed dollar amount. You also decide how to prompt the user, either by requesting the customer's age or asking whether the customer is a senior.

The output of your program should be the cost of the requested service.

You may use your code from Weeks 3 and 4 as a starting platform or start a new program. At a minimum, your program should have one function to calculate the house cleaning cost, another to calculate the yard service cost, and a third to determine the discount.

Your program should include comments for the major steps of your code. You should already have these in your design. Also document the values you chose as the cost of house cleaning, which include the cutoffs for the three house sizes, the cost for each size, and the surcharge for a more complete cleaning. In addition, document the cost of square foot for mowing, the cost per linear foot for edging, and the cost per shrub for pruning. Finally you should document any constants involved in determining the senior discount.

Your program should include Header comments (what the program does) and in-line comments (the major design steps).

Submit your Python program as a text file (.py) file. In addition, submit a Design outline and a Test plan/report (3 different test cases-but the invalid inputs must be tested.) in a Word document or a PDF file and include a screenshot of execution of your program for each test case.

Your submission must also adhere to the Submission Requirements document (i.e., Filename and display your name, class, date in the output).

Week3 assignment submit

def main():

#Initialize variables #House size # Small House : 1-5 rooms # Medium House: 6-10 rooms # Large House : 11 or more rooms

# Prices for cleaning types: # Floors: $40 for small, $65 for medium, $90 for large # Windows: $20 for small, $35 for medium, $50 for large # Bathrooms: $30 for small, $50 for medium, $70 for large # Dusting: $15 for small, $25 for medium, $30 for large

# Display Welcome message print(" Welcome to Mike Cleaning") #notice the is a new line # Prompt user for the number of rooms in the house rooms = int(input("Enter the number of rooms in the house: "))

# Prompt user for the type of cleaning cleaning_type = input("Enter the type of cleaning (floors, windows, bathrooms, dusting): ")

# Initialize the cost to 0 cost = 0

# Determine the size of the house if rooms <= 5: size = "small" elif rooms <= 10: size = "medium" else: size = "large"

# Determine the cost based on the number of rooms and type of cleaning

if cleaning_type == "floors": if size == "small": cost = 40 elif size == "medium": cost = 65 else: cost = 90 elif cleaning_type == "windows": if size == "small": cost = 20 elif size == "medium": cost = 35 else: cost = 50 elif cleaning_type == "bathrooms": if size == "small": cost = 30 elif size == "medium": cost = 50 else: cost = 70 elif cleaning_type == "dusting": if size == "small": cost = 15 elif size == "medium": cost = 25 else: cost = 30

#Display the output print("The cost of cleaning a", size) print("house with", rooms) print("rooms for", cleaning_type) print("is $" + str(cost))

#--- Execute -------------------------------------------------------- main()

week 4 assignment submit

def main(): # Initialize variables room_count = 0 size = "" cleaning_type = "" price = 0

# House size small_house_rooms = 5 medium_house_rooms = 10

# Prices for cleaning types floors_small = 40 floors_medium = 65 floors_large = 90 windows_small = 20 windows_medium = 35 windows_large = 50 bathrooms_small = 30 bathrooms_medium = 50 bathrooms_large = 70 dusting_small = 15 dusting_medium = 25 dusting_large = 30

# Display Welcome message print("Welcome to Mike Cleaning Service")

# Prompt user for the number of rooms in the house room_count = int(input("Enter the number of rooms in your house: "))

# Determine the size of the house if room_count <= small_house_rooms: size = "small" elif room_count <= medium_house_rooms: size = "medium" else: size = "large"

# Prompt user for the type of cleaning cleaning_type = input("Enter the type of cleaning (Floors, Windows, Bathrooms, Dusting): ")

# Determine the price based on the house size and cleaning type if size == "small": if cleaning_type == "Floors": price = floors_small elif cleaning_type == "Windows": price = windows_small elif cleaning_type == "Bathrooms": price = bathrooms_small elif cleaning_type == "Dusting": price = dusting_small elif size == "medium": if cleaning_type == "Floors": price = floors_medium elif cleaning_type == "Windows": price = windows_medium elif cleaning_type == "Bathrooms": price = bathrooms_medium elif cleaning_type == "Dusting": price = dusting_medium else: if cleaning_type == "Floors": price = floors_large elif cleaning_type == "Windows": price = windows_large elif cleaning_type == "Bathrooms": price = bathrooms_large elif cleaning_type == "Dusting": price = dusting_large

# Display the price print("The price for cleaning a", size, "house with", cleaning_type, "is: $" + str(price))

#--- Execute -------------------------------------------------------- main()

PS for week 4, I got a bad grade because the teachers said:

The program must include a function and a call to the function.

The function should accept the number of rooms, and the type of cleaning as parameters and should return the cost of the house cleaning.

Thank you for your help

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

Step: 3

blur-text-image

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

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

2. When is the job to be completed?

Answered: 1 week ago