Advertisement
differen71

travel_agency

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