Sichanov

dd

Aug 12th, 2021
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.28 KB | None | 0 0
  1. name_city = input()
  2. type_package = input()
  3. vip_package = input()
  4. number_days_for_holiday = int(input())
  5. price = 0
  6. if number_days_for_holiday > 0:
  7.     if number_days_for_holiday > 7:
  8.         number_days_for_holiday -= 1
  9.     if name_city == "Bansko" or name_city == "Borovets":
  10.         if type_package == "noEquipment":
  11.             price = number_days_for_holiday * 80
  12.             if vip_package == "yes":
  13.                 price -= price * 0.05
  14.         elif type_package == "withEquipment":
  15.             price = number_days_for_holiday * 100
  16.             if vip_package == "yes":
  17.                 price -= price * 0.10
  18.         else:
  19.             print("Invalid input!")
  20.     elif name_city == "Varna" or name_city == "Burgas":
  21.         if type_package == "withBreakfast":
  22.             price = number_days_for_holiday * 130
  23.             if vip_package == "yes":
  24.                 price -= price * 0.12
  25.         elif type_package == "noBreakfast":
  26.             price = number_days_for_holiday * 100
  27.             if vip_package == "yes":
  28.                 price -= price * 0.07
  29.         else:
  30.             print("Invalid input!")
  31.     else:
  32.         print("Invalid input!")
  33. else:
  34.     print("Days must be positive number!")
  35. if price > 0:
  36.     print(f"The price is {price:.2f}lv! Have a nice time!")
Advertisement
Add Comment
Please, Sign In to add comment