Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- movie_name = input()
- total_tickets = 0
- standard_tickets = 0
- student_tickets = 0
- kid_tickets = 0
- while movie_name != 'Finish':
- free_seats = int(input())
- sold_tickets_per_movie = 0
- command = input()
- while command != 'End':
- ticket_type = command
- total_tickets += 1
- sold_tickets_per_movie += 1
- if ticket_type == 'standard':
- standard_tickets += 1
- elif ticket_type == 'student':
- student_tickets += 1
- else:
- kid_tickets += 1
- if sold_tickets_per_movie == free_seats:
- break
- command = input()
- percent_theater_seats = sold_tickets_per_movie / free_seats * 100
- print(f'{movie_name} - {percent_theater_seats:.2f}% full.')
- movie_name = input()
- print(f'Total tickets: {total_tickets}')
- percent_student_tickets = student_tickets / total_tickets * 100
- print(f'{percent_student_tickets:.2f}% student tickets.')
- percent_standard_tickets = standard_tickets / total_tickets * 100
- print(f'{percent_standard_tickets:.2f}% standard tickets.')
- percent_kid_tickets = kid_tickets / total_tickets * 100
- print(f'{percent_kid_tickets:.2f}% kids tickets.')
Advertisement
Add Comment
Please, Sign In to add comment