-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcinema.py
More file actions
23 lines (18 loc) · 733 Bytes
/
cinema.py
File metadata and controls
23 lines (18 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
films={"Finding Dory":[3,5],
"Tarzan":[18,5],
"Django":[18,9]}
while 1:
choice=input("What film do you wish to watch?: ").strip().title()
if choice in films:
age=input("What is your age?: ").strip()
if int(age) >= films[choice][0]:
ticket=int(input("How many tickets?: ").strip())
if films[choice][1] >= ticket:
print("Thank you! Have great session!")
films[choice][1]-=ticket
else:
print("Sorry, but there's isn't enough seats available.")
else:
print("The film is not recommend for your age! Please choose again.")
else:
print("We don't have the film available!")