Write this program using python. In your program, when you prompt users for valu
ID: 3743383 • Letter: W
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 weekExplanation / Answer
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.')
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.