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