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]
2 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]2 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
Discuss the benefits of a system safety effort other than improved safety
klio [65]

Answer: Safety effort of system is defines as the measures that are taken to provide and maintain the protection of the system.There are several methods ,tool and efforts made for the system security .Benefits of the system security are as follows:-

  • Takes control over the hazardous situation and maintain the security
  • System security will also increase the development of the system easily.
  • Approach towards the analyzing of the system function
  • Data, information and functions are safe from being detected in unauthorized way.
  • Functions and implementation is made easy without the fear of getting attacked or hacked.

8 0
3 years ago
A laptop computer communicates with a router wirelessly, by means of radio signals. the router is connected by cable directly to
Hoochie [10]
The answer would be 2500 Bits
4 0
3 years ago
What was the basic invention that has evolved into the modern automobile?
anygoal [31]

Answer:

I would say Henry Ford's invention; the Ford car company, since we still have Ford cars running nowadays.

Explanation:

3 0
3 years ago
Suppose we are sorting an array of nine integers using heapsort, and we have just finished one of the reheapifications downward.
Ilia_Sergeevich [38]

Answer:

3

Explanation:

Heap sort pick an item from the first or last position in an array and compares it with other items in other positions in the array, swapping position if they meet the condition.

The array above has three maximum items arranged sequentially in the array, this is prove that there have been 3 reheapifications in the array.

7 0
3 years ago
Suppose Pentax develops a new photo editing software and negotiates agreements with a Vietnamese manufacturer to assemble most P
Elis [28]

Answer:

Contract manufacturing

Explanation:

Contract manufacturing involves outsourcing a portion of a manufacturing process of a product to another company.

5 0
2 years ago
Other questions:
  • What do i study to become a network engineer?
    11·1 answer
  • Which type of denial of service attack exploits the existence of software flaws to disrupt a service?
    12·1 answer
  • Which technology can allow a single ground-based telescope to achieve images as sharp as those from the Hubble Space Telescope?
    7·1 answer
  • What does the phrase at the drop of a hat mean?
    11·2 answers
  • What are html documents also called?
    12·1 answer
  • What is the relationship between interoperability and the other quality attributes highlighted in this book? For example, if two
    5·1 answer
  • (1) Output a menu of automotive services and the corresponding cost of each service. (2 pts)Ex:Davy's auto shop servicesOil chan
    9·1 answer
  • Please be my friend. my best and only friend isn't talking to me for some reason
    9·2 answers
  • Which statement is true about the energy of electromagnetic radiation?
    15·1 answer
  • Kevin would like to ensure that his software runs on a platform that is able to expand and contract as needs change. Which one o
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!