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
If you were programming a robot to respond to touch, the path might look something like this:
aniked [119]

Answer:

what

Explanation:

5 0
3 years ago
Read 2 more answers
Do all accounts serve the same function? Why or why not?
lora16 [44]

The correct answer is D. No, accounts serve the purpose that their owners choose.

There are different types of bank accounts which are for saving, fixed deposit account, current account, and recurring account.

Basic banking provides amount of customers with a banking comfort.

They also provide cistomer and secure friendly environment.

3 0
2 years ago
Read 2 more answers
Editing is important because it allows you to
asambeis [7]
Answer A is the answer, as it combines all choices in the list. One can check the overall structure.
8 0
3 years ago
Which of the following is NOT a benefit of making digital information and scientific databases openly available across the inter
Eddi Din [679]

Answer:

C. Inaccurate and misleading data can be more easily disseminated to scientific researchers.

Explanation:

The above one is certainly the correct option. We know these kinds of the database as an open database, and these are available for all on the internet. The best example is the World Bank database, Census.org is also a good example. All these databases are a huge collection of data sets with meaningful data. The inaccurate and misleading data is never thought to be spread among the scientific researchers easily as it is not good for research, and requires a huge level of data cleaning. Hence, C. is the correct option here as it is not an advantage.

8 0
3 years ago
With examples write short notes on any of the following terms below.
stepladder [879]

types of computer viruses

1. polymorphic virus

2. worm

3.trojan horse

4.directory virus

5.boot virus

6.directory virus

7. macro virus

8. web scripting virus

9. memory resident virus

10. overwrite virus

11. direct action virus

12. multipartite virus

5 0
3 years ago
Other questions:
  • In Florida no fault insurance is optional for owners of a vehicle
    6·1 answer
  • Which of the following components does a typical two stroke engine contain
    7·2 answers
  • _ models are non visual ways of communicating how someone thinks about something in the natural world
    12·1 answer
  • You suspect a component in a computer is fried. You remove any unnecessary hardware devices one by one to narrow down where the
    7·1 answer
  • __________ contain(s) remnants of word processing documents, e-mails, Internet browsing activity, database entries, and almost a
    9·1 answer
  • Fill in the blanks of the SQL Statements: Fund_Id VARCHAR(10) , Donor_id VARCHAR(10) , Count_Of_Receipts INTEGER, Total_Receipts
    15·1 answer
  • Which audio media can be directly sent to the subscribers through an RSS feed?
    6·1 answer
  • What are the data type(s) will be used to declare the variable(s) needed to
    9·1 answer
  • When researching Information about technology for use in a project, it is NOT important to consider the date that the informatio
    5·1 answer
  • write an algorithm to determine a student's final grade and indicate whether it is passing or failing. the final grade is calcul
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!