Advertisement
Guest User

04.Cinema

a guest
Mar 28th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. total_count = int(input())
  2. seats = total_count
  3. all_guests = 0
  4. income = 0
  5. price = 1
  6.  
  7. while total_count >= 0:
  8. people_in = str(input())
  9. if people_in != "Movie time!":
  10. people_in = int(people_in)
  11. total_count -= people_in
  12. all_guests += people_in
  13. price = people_in * 5
  14. if people_in % 3 == 0:
  15. discount = 5
  16. price -= discount
  17. income += price
  18. if people_in == "Movie time!":
  19. seats_left = seats - all_guests
  20. print(f"There are {seats_left} seats left in the cinema.")
  21. print(f"Cinema income - {income} lv.")
  22.  
  23. if total_count < 0:
  24. print("The cinema is full.")
  25. print(f"Cinema income - {income - price} lv.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement