in python A painting company has determined that for every 125 square feet of wa
ID: 671375 • Letter: I
Question
in python
A painting company has determined that for every 125 square feet of wall space,
one gallon of paint and eight hours of labor are required. The company charges
$42.50 per hour for labor. Write a program call
paintjob.py
that asks the user to
enter the square feet of wall space to be painted and the price of the paint per
gallon. The program is to display the following information:
•
The number of gallons of paint required rounded up to whole gallons.
•The hours of labor required.
•The cost of the paint based on the rounded up whole gallons.
•The labor charges.
•The total cost of the paint
Explanation / Answer
area_in=raw_input("enter the square feet of wall space to be painted")
paint_cost_in=raw_input("enter the price of the paint per gallon")
area=int(area_in)
paint_cost=int(paint_cost_in)
num_gallons=area/125
num_labour_hours=area*8/125
total_paint_cost=int(num_gallons)*paint_cost
labour_cost=num_labour_hours*42.5
total_paint_cost2=num_gallons*paint_cost
print num_gallons,num_labour_hours,total_paint_cost,labour_cost,total_paint_cost2
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.