Question
IN PYTHON PLEASE :) A theater has requested that you write a ticket selling application. This application will be given an amount of tickets to
IN PYTHON PLEASE :)
A theater has requested that you write a ticket selling application. This application will be given an amount of tickets to sell and then interface with customers to sell the tickets. The theater have a policy that each customer can buy 4 or fewer tickets. If a customer does any of the following you should deny the sale: Purchase more than 4 tickets Purchase 0 or a negative number of tickets Purchase more tickets than are available After all the tickets are sold they would like to know the total number of buyers. They have provided an example of how the application should look when ran:
Sample Execution
Please enter the number of tickets to sell: 10 Please enter the number of tickets to purchase: -1 I'm sorry but I can't sell you that many. Please enter the number of tickets to purchase: 4 6 tickets remaining. Please enter the number of tickets to purchase: 1 5 tickets remaining. Please enter the number of tickets to purchase: 5 I'm sorry but I can't sell you that many. Please enter the number of tickets to purchase: 4 1 tickets remaining. Please enter the number of tickets to purchase: 1 0 tickets remaining. Total buyers: 4
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