Question

Write this program using python. In your program, when you prompt users for values, only prompt them to enter one value at a time. Here is a sample of what your program should look like. Sample Program Run (User input in bold) What is the length of the room (in feet)? 50 What is the width of the room (in feet)? 30 What is the length of the table (in feet)? 8 What is the width of the table (in feet)? 4 How much space is required between tables (in feet?) 3 How many people does each table set? 10 This arrangement seats 120 people. Hint: The 3 feet space in this example is on each side of the table, all four sides of every table. The math works out, simple algebra. You will need variables and use the math operators in chapter two which was your reading this week

0 0
Add a comment Improve this question Transcribed image text
Answer #1
room_length = int(input('What is the length of the room (in feet)? '))
room_width = int(input('What is the width of the room (in feet)? '))

table_length = int(input('What is the length of the table (in feet)? '))
table_width = int(input('What is the width of the table (in feet)? '))

space = int(input('How much space is required between tales (in feet?) '))
people = int(input('How many people does each table set? '))

n1 = (room_length - space) // (table_length + space)
n2 = (room_width - space) // (table_width + space)

total_people = (n1*n2*people)

print('This arrangement seats ' + str(total_people) + ' people.')
Add a comment
Know the answer?
Add Answer to:
Write this program using python. In your program, when you prompt users for values, only prompt...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a python program that runs only on the command-line prompt. i.e. if you run this...

    Write a python program that runs only on the command-line prompt. i.e. if you run this program on IDEL it would give you an error message. Name the program “buy.py.” Assume that this program is used by a departmental store to calculate your total price if you want to buy an extended warranty for your purchased Computer. The program takes two arguments at the command-line prompt: 1) the computer’s brand name, and 2) the price of the computer that you...

  • using python3 Write a Python program that will ask the user for: 1. The length of...

    using python3 Write a Python program that will ask the user for: 1. The length of a rectangle. 2. The width of a rectangle and will print out the length of the diagonal of the rectangle. So your program should look like this: Please enter the length of the rectangle: Please enter the width of the rectangle: The diagonal of the rectangle is: So the user enters the length, width and then the answer is printed.

  • program language: python 3 Purpose: Solve a problem by writing multiple functions that perform different subtasks,...

    program language: python 3 Purpose: Solve a problem by writing multiple functions that perform different subtasks, and combining their use to solve a larger problem. Also to practice documenting functions. Degree of Difficulty: Moderate Your task is to compute the cost of renovating the flooring in a rectangular room. This includes replacing the carpet and and the baseboards. Your task is to write a Python program that calculates and the cost of the renovation. To accomplish this, you will need...

  • Today you are to write a Java program that will prompt for and read 2 words...

    Today you are to write a Java program that will prompt for and read 2 words of equal length entered by the user, and create a new word which contains the last letter of the 1st word, the last letter of the 2nd word, followed by the second to last character of the 1st word, followed by the second to last character of the 2nd word and so on. Be sure to use the same format and wording as in...

  • Using the Python program be able to identify or discuss the following: A good test plan...

    Using the Python program be able to identify or discuss the following: A good test plan – how would you determine that it is working? Limitations of the program – what would you do to enhance it? Output improvement – what would you add to improve output? Examples of local variables – name, types, and scope Reason why global variables are not recommended Examples of constants Use of Boolean variable Use of floating point variable Use of integer variable Math...

  • With this program you are going to design a math practice program for younger users. You...

    With this program you are going to design a math practice program for younger users. You will ask the user to enter two numbers. Only numbers may be entered. If the user enters a word, the program should disregard the entry and wait for an integer entry. There will not be another prompt if the user enters data other than whole numbers (integers). Here is a sample run: Your static methods should accept two integers and return an integer. Do...

  • I need to write a paint job estimator program in python. I have most of it...

    I need to write a paint job estimator program in python. I have most of it down but i keep getting errors and I dont know how to fix it or what im doing worng specs: A painting company has determined that for every 350 square feet of wall space, one gallon of paint and six hours of labor are required. The company charges $62.25 per hour for labor. Write a program call paintjobestimator.py that asks the user to enter...

  • For each problem, you must: Write a Python program Test, debug, and execute the Python program...

    For each problem, you must: Write a Python program Test, debug, and execute the Python program Save your program in a .py file and submit your commented code to your Student Page. Note regarding comments: For every class, method or function you create, you must provide a brief description of the what the code does as well as the specific details of the interface (input and output) of the function or method. (25 pts.) Write a program that reads in...

  • Using Python Write the following well-documented (commented) program. Create a class called Shape that has a...

    Using Python Write the following well-documented (commented) program. Create a class called Shape that has a method for printing the area and the perimeter. Create three classes (Square, Rectangle, and Circle) which inherit from it. Square will have one instance variable for the length. Rectangle will have two instance variables for the width and height. Circle will have one instance variable for the radius. The three classes will have methods for computing the area and perimeter of its corresponding shape....

  • This is in c programming using functions in visual studios Carpet Jolb A carpeting company wants...

    This is in c programming using functions in visual studios Carpet Jolb A carpeting company wants to estimate what it will cost a customer to have a room carpeted. They can carpet 65 sq. ft. of room space in 4 hours, and they charge $25.00 per hour as their labor rate Write a program to ask the user for the length of the room (in inches) to be carpeted, the width of the room (in inches) to be carpeted, and...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT