Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON !HELP!! Purpose: To write a function that performs a subtask and returns an answer Degree of Dificulty: Easy Terri, a homeowner, wants to estimate

PYTHON !HELP!!image text in transcribed

Purpose: To write a function that performs a subtask and returns an answer Degree of Dificulty: Easy Terri, a homeowner, wants to estimate how much it would cost to repaint her backyard fence. Fortunately for her, her backyard is rectangular, which makes computations easy. She only needs 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. Remember to include an appropriate docstring which states the function's purpose, parameter(s) and return valuels) 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 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.685 Enter the cost oI palnt 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

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part 3 Lnai 8726

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448440, 978-3662448441

More Books

Students also viewed these Databases questions

Question

7. Identify six intercultural communication dialectics.

Answered: 1 week ago