Page 1 of 1

#########Please I need you to do this effectively. I need you to also produce a test plan, not pdf, just put it below y

Posted: Sat May 14, 2022 4:44 pm
by answerhappygod
#########Please I need you to do this effectively. I need
you to also produce a test plan, not pdf, just put it below your
program.. below is the code I wrote already for the week 4, so
please build on it.Thanks#######
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/pseudocode. 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 moving, 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.
You are to submit your Python program as a .py file.
In addition, you are also to submit a test plan in a Word document
or a .pdf file.
###########Previous code for you to build
upon##################
#Defining the Values
def House_cleaning():

#Price for cleaning categories per house
Standard= 25
Premium= 35
#Prices according to house size
Small= 100
Medium= 150
Large= 200
#House size categories: Small<=3, Medium= 4,
Large>=5
def TotalCleaningCost(Houses,clean_type):
if Cleaning_type==1:

Cleaning_Cost=Standard
else:

Cleaning_Cost=Premium
if Houses<=3:
Total_Cost= Small +
Houses * Cleaning_Cost
elif Houses ==4:
Total_Cost= Medium +
Houses * Cleaning_Cost
elif Houses>= 5:
Total_Cost= Large +
Houses * Cleaning_Cost
return Total_Cost
#Prompt user for amount of houses
Houses=eval(input('How many houses are you cleaning
today?\n'))
#Prompt user for Cleaning Category
print('Which of the following would you like
today?')
print('(1)Standard = Dusting and Sweeping')
print('(2)Premium = Standard + Disinfecting + Wax +
Mop + Paint')
Cleaning_type=eval(input(' Enter 1 for Standard ,
Enter 2 for Premium\n'))

#Get the cost
Cost=TotalCleaningCost(Houses, Cleaning_type)
#Display total for house cleaning
print(' The total cost = $ ', Cost)
return Cost
def Yard_Cleaning():

#Prices for Yard cleaning
Mowing=30
Edging_cost_per_feet=20
Shrub_pruning_per_shrub= 55

print('Yard Cleaning')
print('How many square feet would be mowing
today?')
yard_sq_ft=eval(input())
print ('How many feet would you like to edge
today?')
yard_edging=eval(input())
print('How many Shrubs would be pruning
today?')
shrubs=eval(input())
#Calculate Total Cost for yard service
Total_cost= yard_sq_ft * Mowing + yard_edging*
Edging_cost_per_feet + shrubs * Shrub_pruning_per_shrub
#print Total Cost
print('Total Cost of Yard Cleaning = $',
Total_cost)
return Total_cost
#Calculate discount
def Calculate_discount(Cost):
discount= 0.10*Cost
price_after_discount=Cost-discount
return price_after_discount
def main():
Total_cost=0
Service_choice=int(input('Which service are you
choosing today?\n (1)House Cleaning\n (2) Yard Cleaning\n'))
if Service_choice==1:
Total_cost=House_cleaning()
elif Service_choice==2:
Total_cost= Yard_Cleaning()
else:
print('invalid input')
#Senior citizen discounts
Senior=input('Are you a senior
citizen?\n(Y/N)\n')
if Senior=='Y' or Senior=='y':
print('You got a 10 percent
discount')
print('Total= $ ',Calculate_discount
(Total_cost))
else:
print('Total= $ ', Total_cost)
if __name__=='__main__':
main()