Please use Python Write a program that determines the cost of painting the walls of a windowless room. There is one door and it will be painted the same color as the walls. The problem requires a main function and two custom functions that are imported from a custom module that you create. In main, the program should prompt the user for five inputs shown in blue in the Sample Output below: the length, width, and height of the room in feet. the cost of one quart of the chosen paint. the square feet that can be covered by one quart of paint. The three dimensions of the room should then be used as arguments for a function that calculates and returns the area of the walls in square feet. This area and the remaining two inputs should be used as arguments for a second, void function that determines and prints the cost of the painting job. There will likely be paint left over. There is a method in the math module that you can use to "round up" the number of quarts needed.Sample OutputEnter the length of the room in feet 20Enter the width of the room in feet 16Enter the height of the walls in feet 9Enter the price of one pail of paint 24.99Enter the sq ft covered by one pail 100This job requires 7 pails of paintThe cost of paint is $174.93

Question

Please use Python

Write a program that determines the cost of painting the walls of a windowless room. There is one door and it will be painted the same color as the walls. The problem requires a main function and two custom functions that are imported from a custom module that you create. In main, the program should prompt the user for five inputs shown in blue in the Sample Output below:

  • the length, width, and height of the room in feet.
  • the cost of one quart of the chosen paint.
  • the square feet that can be covered by one quart of paint.

The three dimensions of the room should then be used as arguments for a function that calculates and returns the area of the walls in square feet. This area and the remaining two inputs should be used as arguments for a second, void function that determines and prints the cost of the painting job. There will likely be paint left over. There is a method in the math module that you can use to "round up" the number of quarts needed.
Sample Output
Enter the length of the room in feet 20
Enter the width of the room in feet 16
Enter the height of the walls in feet 9
Enter the price of one pail of paint 24.99
Enter the sq ft covered by one pail 100
This job requires 7 pails of paint
The cost of paint is $174.93

Expert Answer

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Science

Python

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: Select the FSMO role that is required to be online to facilitate the addition or removal of a domain...

A: Domain Controller:Domain controller is a server computer on Microsoft servers.The purpose of domain ...

Q: Translate the following pseudocode for finding the minimum value from a set of inputs.Set a Boolean ...

A: For solving this question first, we must know what pseudocode code is and what exactly question is a...

Q: Question 2: Which statement(s) is/are true about vectors? a) A vector's size is static. b) A vector'...

A: VectorsA vector is an object that has both magnitude and direction. It is a directed line segment wh...

Q: Many documents use a specific format for a person's name. Write a program whose input is: firstName ...

A: This program can be done in a very easy way. Programming instruction: First, take the input from the...

Q: 4. Given the for loop, rewrite the code so that it executes exactly the same but uses a while loop f...

A: For-loop syntax:             for(initialization ; condition ; updation)                             ...

Q: Within the NTDS folder, which file stores the main Active Directory database? Group of answer choice...

A: Within the NTDS folder, the “Ntds.dit”file stores the main Active Directory database .Hence, option ...

Q: You are a new employee in the engineering organization of a large camping equipment and outdoor furn...

A: Successful implementation of Product Lifecycle Management (PLM) systemA PLM system is an information...

Q: Consider the following code. What will be printed out by the code?

A: Implementing the given program code in a class to get the output and modifying some output statement...

Q: 2. What are the differences between the top-down and bottom-up approaches to information security?Wh...

A: What are the differences between the top-down and bottom-up approaches to information security?Why i...

Q: Draw a decision tree and find the number of key comparisons in the worst and average cases for the t...

A: Decision tree (enhanced bubble sort):

Q: whats is the length of UDP?

A: The given User Datagram Protocol header is 12 03 00 0F 00 1E A3 10.The UDP (User Datagram Protocol) ...

Q: please just help with parts afterr //     3) Write friend function for the following class to overlo...

A: A friend function is defined outside the context of a class, but it has the rights to access the mem...

Q: Write a program that takes the x, y coordinates of a point in the Cartesian plane and prints amessag...

A: Note: You didn't mention any languages so i use C language//include the header file#include<stdio...

Q: I have tried this  a few times and cannot figure it out. This is for python.

A: The sub lists can be printed by printing each row; hence the answer would be:for i in range(len(tabl...

Q: Find the truth table that describes the following circuit:

A: The gates involved in the given circuits are:AND gate between Y and X.XNOR gate between Y and ~Z whi...

Q: 4.7: Time Machine Your time machine is capable of going forward in time up to 24 hours. The machine ...

A: Following is the c++ program that takes start time and future time as input from user and finally pr...

Q: This is my code for an MIPS assignment where im taking numbers into an array and reversing within th...

A: Note:For the given code and attached image, the following explanation is briefly described about the...

Q: What role does database technology play in managing data as a business resource within an organizati...

A: Data resource management is applying software tools and information systems technologies such as dat...

Q: What is the new risk management framework initiative? How is it superior to the previous approach fo...

A: The New risk management framework initiative:It is the NIST special publication 800-37, this is the ...

Q: What 1s the output of the following code! { String myStr = new String("Cheggers2019") ; System.out.p...

A: There seems to be some error in the question, hence we are proceeding with a small assumption on our...

Q: Draw the EER diagrams for the following problems using UML notation, Crow’s Foot notation and Chen n...

A: Hey, since there are multiple questions posted, we will answer first question. If you want any speci...

Q: Write a program that asks for the name of an input file. Then, read all the numbers in the file, and...

A: Create a PYTHON3 file in which import io module and validate file in program.Print sum, number of el...

Q: Write a program that displays the income tax due on taxable income entered by the user. Have the use...

A: The program that displays the income tax due on taxable income is created in java.In calTax() method...

Q: Complete the program used on the instructions given in the comments:   C++ lang #include <string&...

A: Click to see the answer

Q: What challenges did Cisco systems face in order to solve the physical security problems?

A: Click to see the answer

Q: A double-ended queue or deque is a generalization of a stack and a queue that supports adding and re...

A: Program descriptionThe answer for part-1 cannot be attempted as interface and skeleton has not been ...

Q: I need help with this in python. I'm not understanding it

A: To solve this Question following variables and functions have been used:Variables: Arce, landsz, tot...

Q: A bag of cookies holds 40 cookies. The calorie information on the bag claims that there are 10 servi...

A: A C++ program to display the number of calories consumed for the cookies that he/she ate is given be...

Q: All programming languages have a loop capability. Looping is the program logic’s ability to repeat o...

A: Program://inlcude the header files#include <iostream>using namespace std; //definition of main...

Q: Use the Design Recipe to write a function called my_sum  that consumes one parameter, assumed to be ...

A: The python program obeys the following rubrics:Defining a function my_sum which accepts a parameter,...

Q: Using DeMorgan's Law, write an expression for the complement of F ifF(x,y,z) = xz' (xy + xz)+ xy'(wz...

A: DeMorgan’s law:The theorems of DeMorgan are basically two sets of rules or laws developed for AND, O...

Q: Using MIPS assembly language can someone help me write a program that does .. Write a program to fin...

A: Program Instructions:Ask the user for number of integers and get those integers.Load the array, redu...

Q: Problem 3 Guessing game: For this program, have the user guess a number from 1-5. Next, generate a r...

A: Program instructions:Create a form with two fields and one submit button.User enters the number in a...

Q: Translate the following instructions from Pep/9 machine language: (Describe what each instruction do...

A: Given instructions -D1 FC 15 F1 00 21 90 00 20 F1 00 21 F1 FC 16 00 zzSize of main memory is 216 byt...

Q: First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ...

A: Following are the steps to create the java application Rooter that simulates the working of ATM:Crea...

Q: Python 3.7.4 Open the file hostdata.txt for reading.

A: To open the file hostdata.txt for reading, the statement is: f=open('hostdata.txt','r')The following...

Q: How can we check if a table has minimum redundency?A) There is no way to checkB) See if a table has ...

A: Data redundancy:File replication occurs in the database when one or more copies of file are present ...

Q: Assignment First, launch NetBeans and close any previous projects that may be open (at the top menu ...

A: Program: public class MultiTable{public static void main(String[] args){ int i, j; System.out.print(...

Q: 3. Use a trace table to show what is the output of the following program? #include using namespace ...

A: As per the policy we are required to answer only one question.Solution for question 3 is as follows:...

Q: How do I use printf to round to tenths for this code?    { public static void main(String[] args) { ...

A: Printf() method is used in java to format the string in output stream. This method takes the string ...

Q: Python 3.7.4: The current calendar, called the Gregorian calendar, was introduced in 1582. Every yea...

A: In order to correct given program, make the following changes:Put def main() code above the def leap...

Q: Active Directory metadata describes the actual Active Directory data, not the Active Directory datab...

A: Active Directory:The Microsoft Technology used to manage computers and the other devices in a networ...

Q: Given a nested list named table, use a loop to print each sub list of the nested list. The sub lists...

A: Program descriptionOne 3 x3 list is created to demonstrate the conceptdisplay the elements of the su...

Q: First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ...

A: The name of the program is CharCounter.inputEntry is a string type variable and used for storing use...

Q: Python 3.7.4 Use the file object output to write the string "3.14159" to a file called pi.

A: Following is the program code which writes the string "3.14159" to a file called pi.To open a file c...

Q: I need help with this C++ problem.   What is the maximum number of comparisons that a binary search ...

A: A maximum number of comparisons will be done on the bases of a number, for example, a number must be...

Q: I am getting a floating point exception in my code. Which is to divide matrix 1 by matrix 2 (striaig...

A: Program Instructions:A floating-point exception occurs when an attempt is made to divide a number by...

Q: Hi, I am required to: Create an array of 100 integers using a random generator. ( 1 for loop) Provi...

A: The given java program will follow the following rubrics:Importing essential header files.Creating a...

Q: 4.7: Time Machine Your time machine is capable of going forward in time up to 24 hours. The machine ...

A: Program Instructions:Take the time in int variables and store extra symbols in the char extra.Pass t...

Q: A two-dimensional random walk simulates the behavior of a particle moving in a grid of points. At ea...

A: A java program that takes an integer command-line argument “n” and simulates the motion of a random ...