Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning PostgreSQL On The Cloud Simplifying Database As A Service On Cloud Platforms

Authors: Baji Shaik ,Avinash Vallarapu

1st Edition

1484234464, 978-1484234464

More Books

Students also viewed these Databases questions

Question

Prove the sum-of-squares principle, equation 9-12. r e SSE

Answered: 1 week ago

Question

=+6. What is the education level of your key public?

Answered: 1 week ago