GeorgiLukanov87

holiday_taxes

Apr 7th, 2022 (edited)
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.13 KB | None | 0 0
  1. destination = input()
  2. type_packet = input()
  3. vip = input()
  4. count_days = int(input())
  5. total_sum = 0
  6. if count_days < 1:
  7.     print("Days must be positive number!")
  8.     exit()
  9. if destination != "Bansko" and destination != "Borovets" and destination != "Varna" and destination != "Burgas":
  10.     print('Invalid input!')
  11.     exit()
  12. elif type_packet != "noEquipment" and type_packet != "withEquipment" and type_packet != "noBreakfast" \
  13.         and type_packet != "withBreakfast":
  14.     print('Invalid input!')
  15.     exit()
  16. if destination == "Bansko" or destination == 'Borovets':
  17.     price = 80
  18.     if vip == 'yes':
  19.         price *= 0.95
  20.     if type_packet == 'withEquipment':
  21.         price = 100
  22.         if vip == 'yes':
  23.             price *= 0.90
  24. elif destination == 'Varna' or destination == 'Burgas':
  25.     price = 100
  26.     if vip == 'yes':
  27.         price *= 0.93
  28.     if type_packet == 'withBreakfast':
  29.         price = 130
  30.         if vip == 'yes':
  31.             price *= 0.88
  32. if count_days > 7:
  33.     total_sum = price * (count_days-1)
  34. else:
  35.     total_sum = price * count_days
  36. print(f"The price is {total_sum:.2f}lv! Have a nice time!")
Add Comment
Please, Sign In to add comment