Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program in Python. Movie Ticket Software Key programming concepts: variables, input, output, if statements Commands you can t use: exit, quit, and any such functions

Program in Python. Movie Ticket Software
Key programming concepts: variables, input, output, if statements
Commands you cant use: exit, quit, and any such functions that stop the execution of the program in the
middle
Program Inputs
Available Movies Today:
Display to the user the table of movie choices and showtimes
Movie Choice:
User will always enter a single letter but it may not match an actual movie choice
Showtime:
User will always enter a positive whole number but it may not match a valid option
Adult tickets:
User will always enter a positive whole number but only 30 total (kids + adult) tickets
can be purchased at a time
Kid tickets:
User will always enter a positive whole number but only 30 total (kids+adult) tickets
can be purchased at a time
Program Outputs
Total cost: $XXX
replace XXX with the total ticket cost showing at most 2 decimal places
Invalid option; please restart app...
Display this message if the user chooses an improper option
If the movie and/or showtime is invalid, then the program must stop and display Invalid
input; please restart the app...
Assignment Details
Your task is to create a program for selling movie tickets! The program will only support a
few select movies and times but will allow the user to select their movie, desired showtime, and
number of tickets to purchase. Each movie and its respective showtime is given in the table below.
Note that the prices for each movie depend on the time of the movie and the type of ticket being
purchased!
Table 1: Per ticket cost
Before 2 pm After 2 pm
Adult $11.17 $12.45
Child $8.00 $9.68
Table 2: Movies and Showtimes
Menu Option Title Showtimes
A 12 Strong 1)2:302)4:403)7:504)10:50
B Coco 1)12:402)3:45
C The Post 1)12:452)3:353)7:054)9:55
Sample Output
The following test cases do not cover all possible scenarios (develop your own!) but should
indicate if your code is on the right track. To guarantee full credit, your programs output
should exactly match the output below.
Test Case 1:
Available movies today:
A)12 Strong: 1)2:302)4:403)7:504)10:50
B)Coco: 1)12:402)3:45
C)The Post: 1)12:452)3:353)7:054)9:55
Movie choice: B
Showtime: 2
Adult tickets: 0
Kid tickets: 2
Total cost: $19.36
Test Case 2:
Available movies today:
A)12 Strong: 1)2:302)4:403)7:504)10:50
B)Coco: 1)12:402)3:45
C)The Post: 1)12:452)3:353)7:054)9:55
Movie choice: A
Showtime: 9
Invalid option; please restart app...
Test Case 3:
Available movies today:
A)12 Strong: 1)2:302)4:403)7:504)10:50
B)Coco: 1)12:402)3:45
C)The Post: 1)12:452)3:353)7:054)9:55
Movie choice: F
Showtime: 1
Invalid option; please restart app...
Test Case 4:
Available movies today:
A)12 Strong: 1)2:302)4:403)7:504)10:50
B)Coco: 1)12:402)3:45
C)The Post: 1)12:452)3:353)7:054)9:55
Movie choice: C
Showtime: 4
Adult tickets: 4
Kid tickets: 0
Total cost: $49.8
Test Case 5:
Available movies today:
A)12 Strong: 1)2:302)4:403)7:504)10:50
B)Coco: 1)12:402)3:45
C)The Post: 1)12:452)3:353)7:054)9:55
Movie choice: A
Showtime: 1
Adult tickets: 2
Kid tickets: 100
Invalid option; please restart app...
Test Case 6:
Available movies today:
A)12 Strong: 1)2:302)4:403)7:504)10:50
B)Coco: 1)12:402)3:45
C)The Post: 1)12:452)3:353)7:054)9:55
Movie choice: B
Showtime: 3
Invalid option; please restart app...
Test Case 7:
Available movies today:
A)12 Strong: 1)2:302)4:403)7:504)10:50
B)Coco: 1)12:402)3:45
C)The Post: 1)12:452)3:353)7:054)9:55
Movie choice: A
Showtime: 3
Adult tickets: 30
Kid tickets: 1
Invalid option; please restart app...

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

How can the Internet be helpful in a job search? (Objective 2)

Answered: 1 week ago