Question: In this problem, you're given a partially completed program, and you need to update and complete the program to produce the desired output. A landscaping

In this problem, you're given a partially completed program, and you need to update and complete the program to produce the desired output.
A landscaping company has determined that for every 50 square feet of garden space, 1 bag of mulch and 2 hours of labor are required.
The company charges $40.00 per hour for labor plus a flat $100.00 project fee.
This program asks the user to enter the square feet of garden space to be mulched and the price of mulch per bag.
The program will then display:
The number of bags of mulch required
The hours of labor required
The cost of the mulch
The cost of the labor (per hour charges plus project fee)
The total cost of the landscaping job.
NOTE: This company charges the customer for quarter days (2 hours) and does not charge for less than that. So, you should base the hours of labor on the number of bags of mulch. For example, if a job requires 6 bags of mulch, it will also require 12 hours of labor.
The instructor has provided a file called Lab04P1-FillThisIn.py. Download that file and rename it Lab04P1.py.
Copy that file into your PyCharm project.
Change the program header to include your name and the date.
Replace every instance of "--Fill this in--" with correct code that will enable the program to do the required calculations and display the results.
Note there are GLOBAL CONSTANTS at the top of the program. You should use those constants wherever it makes sense to use them.
You should eventually be able to run the program with no errors and produce results like the sample output. Note that all monetary values should have 2 digits after the decimal point.
Sample Output:
Enter garden space in square feet: 100
Enter mulch price per bag: 5.00
Bags of mulch: 2
Hours of labor: 4
Mulch charges: $10.00
Labor charges: $260.00
Total cost: $270.00
Run this program using the PyCharm Terminal. Take a screenshot of the Terminal that includes the line showing where you started the program run with the results. Name the screenshot Lab04P1-ouput.jpg
import math
FillThisIn = None
# Global constants for paint job estimator
FEET_PER_BAG =50
HOURS_PER_BAG =2
LABOR_CHARGE =40.00
PROJECT_FEE =100.00
# main module
def main():
# Ask the user for the garden space in square feet
garden_space = FillThisIn
# Ask the user for the mulch price
mulch_price = FillThisIn
# Calculate number of bags needed
num_bags = math.ceil(garden_space / FEET_PER_BAG)
# Calculate labor hours (2 hours labor for every bag of mulch)
hours_labor = FillThisIn
# Calculate labor charge (including project fee)
cost_labor = FillThisIn
# Calculate mulch cost
mulch_total_cost = num_bags * mulch_price
# Print cost estimate
showCostEstimate(num_bags, hours_labor, mulch_total_cost, cost_labor)
# The showCostEstimate function accepts bags_mulch, labor_hours,
# mulch_total, labor_total as arguments and displays the corresponding
# data.
def showCostEstimate(FillThisIn):
# Calculate total cost
totalCost = FillThisIn
# Display results
print (f'Bags of mulch: {FillThisIn}')
print (f'Hours of labor: {FillThisIn}')
print (f'Mulch charges: ${mulch_total:.2f}')
print (f'Labor charges: ${FillThisIn}')
print (f'Total cost: ${FillThisIn}')
# Call the main function.
main()
import math
FillThisIn = None
# Global constants for paint job estimator
FEET_PER_BAG =50
HOURS_PER_BAG =2
LABOR_CHARGE =40.00
PROJECT_FEE =100.00
# main module
def main():
# Ask the user for the garden space in square feet
garden_space = FillThisIn
# Ask the user for the mulch price
mulch_price = FillThisIn
# Calculate number of bags needed
num_bags = math.ceil(garden_space / FEET_PER_BAG)
# Calculate labor hours (2 hours labor for every bag of mulch)
hours_labor = FillThisIn
# Calculate labor charge (including project fee)
cost_labor = FillThisIn
# Calculate mulch cost
mulch_total_cost = num_bags * mulch_price
# Print cost estimate
showCostEstimate(num_bags, hours_labor, mulch_total_cost, cost_labor)
# The showCostEstimate function accepts bags_mulch, labor_hours,
# mulch_total, labor_total as arguments and displays the corresponding
# data.
def showCostEstimate(FillThisIn):
# Calculate total cost
totalCost = FillThisIn
# Display results
print (f'Bags of mulch: {FillThisIn}')
print (f'Hours of labor: {FillThisIn}')
print (f'Mulch charges: ${mulch_total:.2f}')
print (f'Labor charges: ${FillThisIn}')
print (f'Total cost: ${FillThisIn}')
# Call the main function.
main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!