Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- check_free_seats = 0
- # check_end = False
- statistic = []
- film ={}
- while True:
- name_film = input()
- if name_film == 'Finish':
- break
- free_seats = int(input())
- check_free_seats = free_seats
- while True:
- type_ticket = input()
- if type_ticket == 'End' or check_free_seats < 1:
- percent = ((film['student'] + film['standard'] + film['kid']) / free_seats) * 100
- print(f"{name_film} - {percent:.2f}% full.")
- break
- film['name'] = name_film
- if type_ticket == 'student':
- film['student'] += 1
- elif type_ticket == 'standard':
- film['standard'] += 1
- elif type_ticket == 'kid':
- film['kid'] += 1
- check_free_seats -= 1
- statistic.append(film)
- print(statistic)
- print(statistic)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement