Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name = input()
- total_stident = 0
- total_kid = 0
- total_standard = 0
- total_ticket = 0
- while name != "Finish":
- counter_student = 0
- counter_standard = 0
- counter_kid = 0
- total_counter = 0
- freeplaces = int(input())
- type = input()
- while type != "End":
- if type == 'student':
- counter_student += 1
- elif type == 'standard':
- counter_standard += 1
- elif type == 'kid':
- counter_kid += 1
- total_counter +=1
- if total_counter >= freeplaces:
- break
- else:
- type = input()
- capacity = (total_counter / freeplaces) * 100
- print(f"{name} - {capacity:.2f}% full.")
- total_kid += counter_kid
- total_standard += counter_standard
- total_stident += counter_student
- total_ticket = total_standard + total_stident + total_kid
- name = input()
- print(f"Total tickets: {total_ticket}")
- print(f"{((total_stident /total_ticket)*100):.2f}% student tickets.")
- print(f"{((total_standard /total_ticket)*100):.2f}% standard tickets.")
- print(f"{((total_kid /total_ticket)*100):.2f}% kids tickets.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement