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
Your company has purchased another company that also uses Windows Server 2016 and Active Directory. Both companies need to be ab
Scorpion4ik [409]

Answer:

Create a two-way forest trust

Explanation:

The aim here is to ensure that both companies are able to access the forest resources of each other. The creation of a Two-way Forest Trust would guarantee that as if the Two-way Forest Trust is created between Forest A and Forest B, being the forest resources of the two companies respectively, then all the domains in Forest A will trust every domain in Forest B and vice versa.

5 0
3 years ago
Type the correct answer in the box. Spell all words correctly. What type of network is the Internet? The Internet is an example
denis23 [38]

Answer:

The answer is WAN (Wide Area Network).

Explanation:

  • The Internet is an example of WAN. It stands for wide area network. It is an information network that commonly links to computers that cover a broad specific area. In a WAN, two towns, states, or countries are linked.  
  • The main purpose of using WAN includes a wide range, offers unified information, get upgraded files and software, several email sharing applications, etc.
6 0
3 years ago
What is a bitmap ???
leva [86]
<span>a representation in which each item corresponds to one or more bits of information, especially the information used to control the display of a computer screen.
</span><span>represent (an item) as a bitmap.
</span>
4 0
3 years ago
Read 2 more answers
You want to connect the LAN port on a router to the uplink port on a switch. The switch does not support auto-MDI. Which type of
kirza4 [7]

Answer: Crossover

Explanation:

Based on the information given in the question, the type of cable that should be used is the crossover cable.

Crossover cable is used for a direct connection of computing devices. A crossover cable is typically used for the connection of computing devices that are of identical types.

Since the LAN port on a router is to be connected to the uplink port on a switch and the switch does not support auto-MDI, the crossover cable can be used.

3 0
2 years ago
Digital learning can help students who enjoy
mr Goodwill [35]

Answer:

flexibility and independence

Explanation:

6 0
2 years ago
Other questions:
  • What is the order in which windows systems receiving and process multiple gpos?
    7·1 answer
  • What laptops can you get for 2500$ and should mostly using Microsoft applications.
    14·2 answers
  • An element in an array is 4 bytes long and there are 10 elements in the array. How big is the array?
    6·2 answers
  • The area of a square is stored in a double variable named area. write an expression whose value is length of the diagonal of the
    8·1 answer
  • Hi guys, Im making a game. I want to make a collision event, but what is the code for making the wall and the box collide. I rea
    6·1 answer
  • Write a Racket two-way selection structure that will produce a list '(1 2 3) when the first element of a list named a_lst is ide
    13·1 answer
  • Determine which careers you can enter after completing a training program and which careers require a college degree.
    6·1 answer
  • How do you fix this!!!!
    5·1 answer
  • When a ____________ file is opened, it appears full-screen, in slideshow mode, rather than in edit mode.
    6·1 answer
  • Select the function of keypunches that were used as one of the earliest input devices. A. It was used to control the cursor on t
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!