Answer:
Python code explained below
Step-by-step explanation:
**CODE:
tickets = 100
count = 0
# Loop runs until tickets become zero
while tickets !=0:
print("There are currently", tickets, "tickets remaining.")
# Taking input from user for tickets
userInput = int(input("How many tickets would you like to purchase?"))
# If user enters more than 4 tickets
if userInput > 4:
print("You cannot purchase more than 4 tickets")
# If available tickets are less than user requirment
elif tickets < userInput:
print("Available tickets are less than required")
else:
# Count increment to store the users who brought
count += 1
# Decrementing the available tickets with the user requirements
tickets -= userInput
print("Transaction successful")
print()
print("All the tickets are sold")
print("The total number of buyers was ", count)