Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- standard_tickets = 0
- student_tickets = 0
- kid_tickets = 0
- movie = input()
- while movie != 'Finish':
- seats = int(input())
- counter = 0
- for i in range(seats):
- category = input()
- if category == 'End':
- break
- if category == 'student':
- student_tickets += 1
- elif category == 'standard':
- standard_tickets += 1
- else:
- kid_tickets += 1
- counter += 1
- print(f'{movie} - {counter / seats * 100:.2f}% full.')
- movie = input()
- total_tickets = standard_tickets + student_tickets + kid_tickets
- print(f'Total tickets: {total_tickets}')
- print(f'{student_tickets / total_tickets * 100:.2f}% student tickets.')
- print(f'{standard_tickets / total_tickets * 100:.2f}% standard tickets.')
- print(f'{kid_tickets / total_tickets * 100:.2f}% kids tickets.')
Add Comment
Please, Sign In to add comment