Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help with PYTHON 3. NOT JAVA A homeowner wants to estimate much it would cost to repaint their backyard fence. Fortunately for them, their backyard

Help with PYTHON 3. NOT JAVA

image text in transcribed

A homeowner wants to estimate much it would cost to repaint their backyard fence. Fortunately for them, their backyard is rectangular, which makes computations easy. They only need to consider the cost of paint for the fence on three sides (the house is where the fourth fence side would be). house length length width Figure 1: Top-down view of a fence to be painted that marks the rectangular backyard of a house. Write a Python function fence_cost that takes four parameters as input and returns the total cost of painting both the inside and the outside of the fence. The four parameters should be the width of the fence in metres (m), the length of the fence in m, the height of the fence in m, and the cost of paint per square metre. Outside of the function, prior to calling it, ask the user to input values for each of the function arguments from the console. You may assume that the user supplies valid input. Call the fence_cost function with the arguments you read from the console and output the its return value to the console. Sample Run Here is an example of how your program's console output might look. Green text was entered by the user; blue text came from data returned by the function. Enter the width of the fence area in metres: 10.5 Enter the length of the fence area in metres: 12.0 Enter the height of the fence in metres: 1.65 Enter the cost of paint per square metre: 2.50 The fence will cost $284.625 to paint.

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

Computer Performance Engineering 10th European Workshop Epew 2013 Venice Italy September 17 2013 Proceedings

Authors: Maria Simonetta Balsamo ,William Knottenbelt ,Andrea Marin

2013 Edition

3642407242, 978-3642407246

More Books

Students also viewed these Programming questions

Question

In Exercises, find the limit. x-4 lim x-00x + 1

Answered: 1 week ago

Question

What is a classifi ed balance sheet?

Answered: 1 week ago