Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I A painting company 60 square has determined that for metres of wall space every 2, one gallon of point and five hours of

I A painting company 60 square has determined that for metres of wall space every 2, one gallon of point and five hours of labour required. The company Charges. be 32-50 labour. will per we would like to calculate the total cost of a paint job given the Square metres painted and the price of the paint per gallon. Space to be of hour The problem: Python function that will performs calculations. Specifically, you will produce an estimate of the total cast as follows. The problem is to write a these cost Cost estimated = 1.01843 X Cost total 1.01843 X (Costpaint + labour) The cost of the paint is calculated by multiplying the number of gallons number_ -of-gallons by the price the paint per gallon price_per_gallon. Cast paint = number_of_gallons x price _per_gallon. The labour charges are calculated as the total labour required multiplied by 32.50 of = hours x 32.50 - Jor hours labour charges Your inchiridual number is tied to the total cast so that there is some margin of error in the estimates 2 for example, if 360 square metres the wall space to be painted is of the paint per gallon is 14.00, then the number and the price can be calculated as the surface as follows: number_of- gallons Lue C'est paint can calculate. = surface 60 = of gallons divided 360 = 6 60 = number_of_gallons x price - per-gallon X 6 x 14.00 = 84.00 e 1.01843 x Cast = 1070-89 Laot by 60 The total Amber hours of labour are hour = 5x6 Labour charges 9. total If the individual number is 1.01843, then the the job paint Crounded to two decimals) s : Cost of Cost estimated = 30 haus in total. We can calculate 30 x 32.50 = 975.00 hours x 32.50 = I T T total = 1.01843 x (84.00 975.00) 5 7 | 3 1.) Develop the problem using the the an initial decomposition of Chevron notation (> and >>) From module materials Include decomposition in your Solution document. your 17) Build your decomposition for part (i), develop an algorithm for solving the problem. Include this algorithing in your solution document. 11) write a Python junction definition following ii) the instructions below A Write a single. Python Junction that implements the algorithing you wrote for part (11) Your Junction must be a translation of your algorithm from part (ii) The juncton should have two arguments : one for the wall space to be painted surface and another argument for the price of paint per gallon price.per_gallon. The Junction should have one return value. for the estimated cost Cost estimated. which is a double Crounded to two decimals) 10). Test the function by calling it with the arguments 360 and 14.00 in your python program

Step by Step Solution

3.38 Rating (157 Votes )

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

Step: 3

blur-text-image

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

Starting Out With Java From Control Structures Through Data Structures

Authors: Tony Gaddis

6th Edition

0133957055, 978-0133957051

More Books

Students also viewed these Programming questions

Question

What is the purpose of testing a program with sample data or input?

Answered: 1 week ago