Professional Documents
Culture Documents
BMI Calculator
BMI Calculator
class Ticket:
self.show_time = show_time
self.available_seats = available_seats
self.price = price
self.available_seats -= num_tickets
else:
def check_availability(self):
2
class MovieTheater:
self.name = name
self.shows = []
self.shows.append(show)
def show_showtimes(self):
return showtimes
theater = MovieTheater("Cineplex")
# Add shows
while True:
print(f"\nWelcome to {theater.name}!")
print("Available Showtimes:")
showtimes = theater.show_showtimes()
choice = input("Enter the number of your chosen showtime or 'q' to quit: ")
if choice == 'q':
break
try:
choice = int(choice)
selected_show = theater.shows[choice - 1]
result = selected_show.book_ticket(num_tickets)
print(result)
4
else:
except ValueError: