Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started