SHARE
TWEET

TravelAgency

a guest Dec 9th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. nameOfCity = input()
  2. typeOfPack = input()
  3. discount = input()
  4. dayToStay = int(input())
  5.  
  6. totalPrice = 0
  7.  
  8. if dayToStay > 7:
  9.     dayToStay = dayToStay - 1
  10.  
  11. if nameOfCity == 'Bansko' or nameOfCity == 'Borovets':
  12.  
  13.     if typeOfPack == 'noEquipment':
  14.         if discount == 'yes':
  15.             totalPrice = (80 - (80 * 0.05)) * dayToStay
  16.         else: totalPrice = 80 * dayToStay
  17.  
  18.     if typeOfPack == 'withEquipment':
  19.         if discount == 'yes':
  20.             totalPrice = (100 - (100 * 0.10)) * dayToStay
  21.         else: totalPrice = 100 * dayToStay
  22.  
  23. if nameOfCity == 'Varna' or nameOfCity == 'Burgas':
  24.  
  25.     if typeOfPack == 'noBreakfast':
  26.         if discount == 'yes':
  27.             totalPrice = (100 - (100 * 0.07)) * dayToStay
  28.         else: totalPrice = 100 * dayToStay
  29.  
  30.     if typeOfPack == 'withBreakfast':
  31.         if discount == 'yes':
  32.             totalPrice = (130 - (130 * 0.12)) * dayToStay
  33.         else: totalPrice = 130 * dayToStay
  34.  
  35. if nameOfCity == 'Bansko' or nameOfCity == 'Borovets' or nameOfCity == 'Burgas' or nameOfCity == 'Varna':
  36.     if typeOfPack == 'withEquipment' or typeOfPack == 'noEquipment' or typeOfPack == 'withBreakfast' or typeOfPack == 'noBreakfast':
  37.         if dayToStay > 1:
  38.             print(f'The price is {totalPrice:.2f}lv! Have a nice time!')
  39.         else: print('Days must be positive number!')
  40.  
  41. else:print(f'Invalid input!')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top