Teo_Yanchev

Cinema

Jul 7th, 2020
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. capacity_hall = int(input())
  2.  
  3. count_people = 0
  4. money = 0
  5.  
  6. command = input()
  7. while command != "Movie time!":
  8. people = int(command)
  9. count_people += people
  10.  
  11. if people % 3 == 0:
  12. money += ((people * 5) - 5)
  13. else:
  14. money += people * 5
  15.  
  16. if capacity_hall < count_people:
  17. print(f"The cinema is full.")
  18. if people % 3 == 0:
  19. money -= ((people * 5) - 5)
  20. else:
  21. money -= people * 5
  22. break
  23. command = input()
  24.  
  25. if command == "Movie time!":
  26. diff_seats = capacity_hall - count_people
  27. print(f"There are {diff_seats} seats left in the cinema.")
  28.  
  29. print(f"Cinema income - {money} lv.")
Add Comment
Please, Sign In to add comment