Help please!!! Write a python program for the problem. Thank you. I appreciate i
ID: 3693044 • Letter: H
Question
Help please!!! Write a python program for the problem. Thank you. I appreciate it.
Implement a program named Theater Seating App using the following modifications to the specifications outlined in the book Make sure to also write a main The New Star Theater has 25 seats, which are set up as 5 rows and 5 columns The price for each seat is based on the row and column show below in the table Fill a 5 times 5 grid (make it a list with this information) Create a loop and have users ask for a seat position based on row and column (row, column), remember that list positions start at 0. but the user will ask for the seat starting at row/column 1 Then when the user selects the seat, print out the user's price and mark an 'SS' in the price for that seat (sold seat) When the next user in the loop, asks for a seat make sure you check and see if that seat is already sold, if it is sold tell the user otherwise return the price and mark the set sold After selling 5 seats end the loop and printout the list showing the sold (SS) and unsold (unsold seat has a price) seatsExplanation / Answer
seat = [[50, 50, 50, 50, 50], [40, 45, 45, 45, 40], [30, 35, 35, 35, 30], [20, 20, 20, 20, 20], [10, 10, 10, 10, 10]]
for i in range(0,5):
print("Enter seat number:")
r = int(input('Enter row:'))
c = int(input('Enter column:'))
s = seat[r-1][c-1]
if(s=="SS"):
print("Seat already accupied; enter a different one:")
i = i=1
continue
else:
print("Booked your seat which is of price: ",s)
seat[r-1][c-1] = "SS"
for value in seat:
print(value)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.