Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- film = input()
- standard = 0
- kid = 0
- student = 0
- tickets_total = 0
- while film != "Finish":
- seats = int(input())
- tickets_sold = 0
- for i in range(seats):
- ticket = input()
- if ticket == "End":
- break
- tickets_sold += 1
- if ticket == "standard":
- standard += 1
- elif ticket == "student":
- student += 1
- elif ticket == "kid":
- kid += 1
- print(f"{film} - {((tickets_sold / seats) * 100):.2f}% full.")
- tickets_total += tickets_sold
- film = input()
- if film == "Finish":
- print(f"Total tickets: {tickets_total}")
- print(f"{((student / tickets_total) * 100):.2f}% student tickets.")
- print(f"{((standard / tickets_total) * 100):.2f}% standard tickets.")
- print(f"{((kid / tickets_total) * 100):.2f}% kids tickets.")
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement