Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need help writing a value returning function program for python that estimates t

ID: 675534 • Letter: N

Question

Need help writing a value returning function program for python that estimates total cost of paint job. company determined for every 112 square feet of wall space, one gallon of paint and eight hours of labor will be required .the company charges 35.00 dollars per hour for labor. write program 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 then displays number of gallons required, hours of labor required, cost of paint, labor charges, and total cost of job.

Explanation / Answer


def estimateCost():
sq_feet = int(raw_input('Enter the square feet of wall space to be painted'))
paint = int(raw_input('Price of the paint per gallon'))
gallonRequired = sq_feet*1.0/112
LaborRequired = gallonRequired*8
paintCost = gallonRequired*paint
cost = LaborRequired*35
  
print 'number of gallons required : '+str(gallonRequired)
print 'hours of labor required : ' +str(LaborRequired)
print 'cost of paint : '+str(paintCost) + '$'
print 'labor charges : '+str(cost) + '$'
print 'total cost of job : '+str(cost+paintCost) + '$'
  

estimateCost()
  

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote