Advertisement
veronikaaa86

01. Cinema with "error"

Sep 25th, 2022 (edited)
965
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 1 0
  1. type_ticket = input()
  2. rows = int(input())
  3. cols = int(input())
  4.  
  5. all_seats = rows * cols
  6.  
  7. is_valid_data = True
  8. price = 0
  9. if type_ticket == "Premiere":
  10.     price = 12
  11. elif type_ticket == "Normal":
  12.     price = 7.5
  13. elif type_ticket == "Discount":
  14.     price = 5
  15. else:
  16.     is_valid_data = False
  17.  
  18. if is_valid_data == True:
  19.     total_income = all_seats * price
  20.     print(f"{total_income:.2f} leva")
  21. else:
  22.     print("error")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement