Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name = input()
- ticket_kid = 0
- ticket_standard = 0
- ticket_student = 0
- total = 0
- type_of_ticket = ''
- while name != "Finish":
- free_seeds = int(input())
- type_of_ticket = input()
- tickets_per_movie = 0
- while type_of_ticket != "End":
- tickets_per_movie += 1
- if type_of_ticket == 'kid':
- ticket_kid += 1
- elif type_of_ticket == 'standard':
- ticket_standard += 1
- elif type_of_ticket == 'student':
- ticket_student += 1
- if tickets_per_movie == free_seeds:
- break
- type_of_ticket = input()
- total = ticket_kid + ticket_student + ticket_standard
- print(f"{name} - {tickets_per_movie / free_seeds * 100:.2f}% full.")
- name = input()
- else:
- print(f"Total tickets: {total}")
- print(f"{ticket_student / total * 100:.2f}% student tickets.")
- print(f"{ticket_standard / total * 100:.2f}% standard tickets.")
- print(f"{ticket_kid / total * 100:.2f}% kids tickets.")
Advertisement
Add Comment
Please, Sign In to add comment