How would you get it so sold out message doesn't appear for the user who buys last ticket?
How would you get the sold out to not show for person purchasing X amount of tickets while X amount are available.
Trying to figure out how to get it to once its sold out, it still prompts for name but replies with, Sorry (NAME) the event is sold out.
(hopyfully im not jumping ahead and its fixed in next)
Steven Parker187,287 Points
Since this simple program always begins with a constant number of tickets, you could simply remove the "sold out" message "print" statement completely to prevent the last person from seeing it. You could also change the message to say something like "Thanks for purchasing the last ticket" instead, since you know it will only be shown after the last ticket is purchased.
Shiming Zhang829 Points
Why the tickets_remaining still large than 1, it prints "Sorry the tickets are all sold out."