Question
Write a Python 3 Program that can be used by a movie theater to sell tickets. The auditorium is 15 rows with 30 seats in
Write a Python 3 Program that can be used by a movie theater to sell tickets. The auditorium is 15 rows with 30 seats in each row. The program should show a screen similar to the one posted below to represent the seats available and taken. Taken seats are marked with a *, and available seats with a #. The program should use a function to display the seat map. The user must enter each seat and row for the tickets being sold. If a group of tickets is bought, the program should display the total ticket prices and actively update the seating map. The program should also keep a total of all ticket sales, either via a command to view it or always shown on screen. Should also give the user an option to see which seats have been already sold, how many are available in each row, and how many seats are available in the entire theatre.
Prices per ticket are defined below:
- Row 1-5: $200
- Row 6-10: $175
- Row 11-15: $150
The user must be prompted for a seat, the row, and number of tickets they wish to purchase. Use arrays for data. Use sample code as given below, feel free to change variables, data, and names in the sample code:
def seats(aA, aB, aC, aD):
for r in range (1, 8):
print(" ", r, " ", aA[r]," ", aB[r], " ", aC[r], " ", aD[r])
aisleA = ["","A","A","A","A","A","A","A"]
aisleB = ["","B","B","B","B","B","B","B"]
aisleC = ["","C","C","C","C","C","C","C"]
aisleD = ["","D","D","D","D","D","D","D"]
def more_seat():
seat = input("another seat? (Y/N))
while(seat != "y" and seat != "n"):
seat = input("another seat? (Y/N))
return seat
more_seat = "y"
while(more_seat == "y"):
begin statements here
Row Seats ABCDEFGHIJ K LM NO PQRS TUVW XYZ1234
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started