1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
enot [183]
3 years ago
15

The third assignment involves writing a Python program to compute the cost of carpeting a room. Your program should prompt the u

ser for the width and length in feet of the room and the quality of carpet to be used. A choice between three grades of carpeting should be given. You should decide on the price per square foot of the three grades on carpet. Your program must include a function that accepts the length, width, and carpet quality as parameters and returns the cost of carpeting that room. After calling that function, your program should then output the carpeting cost.
Your program should include the pseudocode used for your design in the comments. Document the values you chose for the prices per square foot of the three grades of carpet in your comments as well.
You are to submit your Python program as a text file (.txt) file. In addition, you are also to submit a test plan in a Word document or a .pdf file. 15% of your grade will be based on whether the comments in your program include the pseudocode and define the values of your constants, 70% on whether your program executes correctly on all test cases and 15% on the completeness of your test report.
Computers and Technology
1 answer:
mojhsa [17]3 years ago
3 0

Answer:

# price of the carpet per square foot for each quality.

carpet_prices=[1,2,4]

def cal_cost(width,height,choice):

 return width*height*carpet_prices[choice-1]  

width=int(input("Enter Width : "))

height=int(input("Enter Height : "))

print("---Select Carpet Quality---")

print("1. Standard Quality")

print("2. Primium Quality")

print("3. Premium Plus Quality")

choice=int(input("Enter your choice : "))

print(f"Carpeting cost = {cal_cost(width,height,choice)}")

Explanation:

The cal_cost function is used to return the cost of carpeting. The function accepts three arguments, width, height, and the choice of carpet quality.

The program gets the values of the width, height and choice, calls the cal_cost function, and prints out the string format of the total carpeting cost.

You might be interested in
Identify the correct sequence of steps to change the font from Verdana to Arial.
kotegsom [21]
Click the font button in the top left hand corner, and search fkr verdana.
3 0
3 years ago
Meg wants to preview all images in a folder so that she can quickly find the image she wants. Which view will help her do this?
galina1969 [7]
Is one of the answers thumbnail? If so, select it.
5 0
3 years ago
Read 2 more answers
Where is the "delete account" button in my profile? And please give me a legit answer and not just a word.
N76 [4]

Answer:

in your profile for brainley ??

3 0
3 years ago
Read 2 more answers
What are the elements of a good study environment? Check all that apply.
finlep [7]

The elements of a good study environment are that it must be well lit the resources are near it is quite and it is clutter free

Explanation:

A good study environment must be an environment that will promote the good study conditions and it must be quite and calm if a person studies in that environment all the resources like the food water and the other refreshments must be available in that environment

The environment must be clean and it must be clutter free without any disturbances and hence these are the factors that will promote the good study environment

3 0
3 years ago
Read 2 more answers
In the context of the box model, what is the difference between a margin and padding
Andrej [43]

Answer:

It is good to know about the differences between margin and padding .Margin is the outer space of an element, while padding is the inner space of an element. In other words, margin is the space outside of an element's border, while padding is the space inside of its border. You can set auto value to margin.

3 0
3 years ago
Other questions:
  • How does an agile team maintain requirement?​
    9·2 answers
  • Who has access to the source code of proprietary software
    6·1 answer
  • What term refers to a device or software system that collects environmental information and makes independent decisions.
    6·1 answer
  • Which two actions allow the System Administrator to limit Chatter access during roll-out to a subset of Salesforce users?
    9·1 answer
  • Which documents might an employer expect to find in a career portfolio?
    15·2 answers
  • What is wrong with my code...
    9·1 answer
  • ANSWER ASAP!!!!!
    10·2 answers
  • What should be entered to make the loop print
    6·1 answer
  • What are the characteristics of Instant Search in Outlook 2016? Check all that apply. A)Typing whole phrases makes your search m
    12·1 answer
  • Explain the concepts of GIGO—garbage in, garbage out. Why do you think it’s a helpful concept in coding? How do you think it can
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!