Guest User

Untitled

a guest
Jun 14th, 2020
40
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. movie = input()
  2. free_seats = int(input())
  3. type_ticket = input()
  4. total_tickets = 0
  5. standard_tickets = 0
  6. student_tickets = 0
  7. kid_tickets = 0
  8.  
  9. while type_ticket != 'Finish':
  10. busy_seats = 0
  11.  
  12. while type_ticket != 'End' and busy_seats < free_seats:
  13.  
  14. busy_seats += 1
  15.  
  16. if type_ticket == 'standard':
  17. standard_tickets += 1
  18. elif type_ticket == 'student':
  19. student_tickets += 1
  20. elif type_ticket == 'kid':
  21. kid_tickets += 1
  22.  
  23. type_ticket = input()
  24.  
  25. total_tickets = standard_tickets + student_tickets + kid_tickets
  26. print(f'{movie} - {(busy_seats / free_seats) * 100:.2f}% full.')
  27.  
  28. if type_ticket != 'Finish':
  29. movie = input()
  30. free_seats = int(input())
  31. type_ticket = input()
  32.  
  33. print(f'Total tickets: {total_tickets}')
  34. print(f'{(student_tickets / total_tickets) * 100:.2f}% student tickets.')
  35. print(f'{(standard_tickets / total_tickets) * 100:.2f}% standard tickets.')
  36. print(f'{(kid_tickets / total_tickets) * 100:.2f}% kids tickets.')
RAW Paste Data