Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can anyone help me fix this problem? It's a Python problem Include function showCostEstimate that accepts the gallons of paint, hours of labor, cost of

can anyone help me fix this problem?

It's a Python problem

Include function showCostEstimate that accepts the gallons of paint, hours of labor, cost of paint, and cost of labor, calculates the total cost, and prints the data. Enter square feet to be painted: 120 Enter price per gallon of paint: 5 Gallons of paint: 2 Hours of labor: 16 Paint charges: $10.00 Labor charges: $560.00 Total cost: $570.00

What i have so far. The main function has to be the one do the calculation but it doesn't work

def showCostEstimate(): square_feet = int(input("Enter square feet to be painted: ")) gallons_price = int(input("Enter price per gallon of paint")) main(square_feet,gallons_price) def main(square_feet,gallons_price): gallons_paint = square_feet / 60 hours_labor = square_feet / 7.5 paint_charges = float(gallons_price * gallons_paint labor_charges = float(hours_labor * 35) total_cost = labor_charges + paint_charges print("Gallons of paint:", gallons_paint) print("Hours of labor:", hours_labor) print("Paint charges:$", format(paint_charges,'.2f'),sep ='') print("Total cost:$", format(total_cost,'.2f'),sep ='')

main()

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_2

Step: 3

blur-text-image_3

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

Transactions On Large Scale Data And Knowledge Centered Systems Xxiv Special Issue On Database And Expert Systems Applications Lncs 9510

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Hendrik Decker ,Lenka Lhotska ,Sebastian Link

1st Edition

366249213X, 978-3662492130

More Books

Students also viewed these Databases questions