Advertisement
exDotaPro

15_june_2019_4_cinema

Jan 21st, 2020
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. cinema_capacity = int(input())
  2.  
  3. ticket_price = 5
  4. bill = 0
  5.  
  6. command = input()
  7.  
  8. while command != 'Movie time!':
  9.     people = int(command)
  10.     cinema_capacity -= people
  11.  
  12.     if cinema_capacity < 0:
  13.         print(f'The cinema is full.')
  14.         print(f'Cinema income - {bill} lv.')
  15.         break
  16.  
  17.     bill += people * ticket_price
  18.  
  19.     if people % 3 == 0:
  20.         bill -= 5
  21.  
  22.     command = input()
  23.  
  24.     if command == 'Movie time!':
  25.         print(f'There are {cinema_capacity} seats left in the cinema.')
  26.         print(f'Cinema income - {bill} lv.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement