Question
Use Python to Create the Theater Application. The application prompts the user for the name of a text file that contains the reserved seats in
Use Python to Create the Theater Application. The application prompts the user for the name of a text file that contains the reserved seats in a theater. It reads the text file and computes the number of reserved seats and the revenue. It also presents a theater seating chart with all the reserved seats marked with x. Each line in the text file contains the row and the column of a reserved seat. Each reservation costs $20 and the theater size is 9 rows X 10 columns. The program output should be formatted as shown in the Sample Run. Note: To complete this assignment, you will need to use the theater.txt file located in Project 6 folder on Blackboard. You will need to place the file in your projects solution folder (This is the folder that contains your *.py file). Your application should work for any number of seats and any *.txt file.
SAMPLE RUN Enter the file name: thea.txt
Error - file not found
Enter the file name: theate
Error - file not found
Enter the file name: theater.txt
Number of tickets: 15
Revenue: $300
x _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ x _ x x _ _ _ _ _ _ _ _ _ _ _ x x _ _ x _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ x x _ _ _ _ _ _ _ x Enter the file name: theater.txt Number of tickets: 15 Revenue: $300 x _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ x _ x x _ _ _ _ _ _ _ _ _ _ _ x x _ _ x _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ _ _ x _ _ _ _ _ _ _ _ x x _ _ _ _ _ _ _ x
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