Advertisement
CR7CR7

aluminium_joinery

Oct 21st, 2023
971
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.60 KB | None | 0 0
  1. pvcCount = int(input())
  2. pvcType = input()
  3. deliveryType = input()
  4.  
  5. pvcPrice = 0
  6. total = 0
  7. priceAfterDiscount = 0
  8.  
  9. if pvcCount <= 10:
  10.     print("Invalid order")
  11. else:
  12.     if pvcType == "90X130":
  13.         pvcPrice = 110
  14.         total = pvcPrice * pvcCount
  15.  
  16.         if pvcCount > 60:
  17.             priceAfterDiscount = total - total * 0.08
  18.         elif pvcCount > 30:
  19.             priceAfterDiscount = total - total * 0.05
  20.         else:
  21.             priceAfterDiscount = total
  22.  
  23.     elif pvcType == "100X150":
  24.         pvcPrice = 140
  25.         total = pvcPrice * pvcCount
  26.  
  27.         if pvcCount > 80:
  28.             priceAfterDiscount = total - total * 0.10
  29.         elif pvcCount > 40:
  30.             priceAfterDiscount = total - total * 0.06
  31.         else:
  32.             priceAfterDiscount = total
  33.  
  34.     elif pvcType == "130X180":
  35.         pvcPrice = 190
  36.         total = pvcPrice * pvcCount
  37.  
  38.         if pvcCount > 50:
  39.             priceAfterDiscount = total - total * 0.12
  40.         elif pvcCount > 20:
  41.             priceAfterDiscount = total - total * 0.07
  42.         else:
  43.             priceAfterDiscount = total
  44.  
  45.     elif pvcType == "200X300":
  46.         pvcPrice = 250
  47.         total = pvcPrice * pvcCount
  48.  
  49.         if pvcCount > 50:
  50.             priceAfterDiscount = total - total * 0.14
  51.         elif pvcCount > 25:
  52.             priceAfterDiscount = total - total * 0.09
  53.         else:
  54.             priceAfterDiscount = total
  55.  
  56.     if deliveryType == "With delivery":
  57.         priceAfterDiscount += 60
  58.  
  59.     if pvcCount > 99:
  60.         priceAfterDiscount *= 0.96
  61.  
  62.     print("{:.2f} BGN".format(priceAfterDiscount))
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement