Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- films = {
- "Avengers" : [12,5],
- "Baby Boss" : [6,2],
- "Coco" : [18,5],
- "Deadpool" :[21,5]
- }
- while True:
- choice = input("What film would you like to watch today?: ").strip().title()
- #check film
- if choice in films:
- age = int(input("How old are you?").strip())
- # check age
- if age >= films [choice][0]:
- # check seats
- num_seats=films[choice][1]
- if num_seats > 0:
- print("Enjoy your film!")
- films[choice][1] = films[choice][1] - 1
- else:
- print ("Sorry, tickets currently sold out.")
- else:
- print("You are too young to watch ")(choice)
- else:
- print("Sorry, We don't have that film currently...")
Add Comment
Please, Sign In to add comment