Question: 6.10 Program 4 The theater has requested that you write a ticket selling application. This application will be given an amount of tickets to sell
6.10 Program 4
The 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
Any help would be appreciated, this is in Python
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
