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 a) The program will prompt the user to enter the length of...

    write a python program a) The program will prompt the user to enter the length of the two vertical sides. b) The length of the two horizontal sides will be twice as long as the length of the two vertical sides. c) The rectangle will be filled with the color green

  • 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.

  • Write a program in Java, Python and Lisp When the program first launches, there is a...

    Write a program in Java, Python and Lisp When the program first launches, there is a menu which allows the user to select one of the following five options: 1.) Add a guest 2.) Add a room 3.) Add a booking 4.) View bookings 5.) Quit The functionality of these options is as follows: 1.) When users add a guest they provide a name which is stored in some manner of array or list. Guests are assigned a unique ID...

  • 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...

  • 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...

  • Write a text analyzer program using Python. The program should prompt the user for text to...

    Write a text analyzer program using Python. The program should prompt the user for text to analyze using the following prompt: Please enter text to analyze or press ENTER (without text) to exit: If the following text is input into by the user: Fog everywhere. Fog up the river, where it flows among green aits and meadows; fog down the river, where it rolls deified among the tiers of shipping and the waterside pollutions of a great (and dirty) city....

  • 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...

  • Write a MIPS math quiz program in MARS. The program should start with a friendly user...

    Write a MIPS math quiz program in MARS. The program should start with a friendly user greeting. From there, it should generate a random arithmetic problem. Your program will need to generate three random things: the first and second operand and the operator to use. Your program should generate random positive integers no greater than 20 for the operands. The possible operators are +, -, * and / (division). The user should be prompted for an answer to the problem....

  • Write python program using IDLE Write a full program that asks the user to enter his/her...

    Write python program using IDLE Write a full program that asks the user to enter his/her name then repeatedly ask to enter the temperature in Fahrenheit and convert it to Celsius, the program should then prompt the user if he/she wants to continue or exit the program. The formula for the conversion is: °C = (°F - 32) x 5/9 The program should use a function for the conversion. An Example of a sample run should appear on the screen...

  • 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...

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
ADVERTISEMENT