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