Arksiana

12. Trade Commissions

Nov 8th, 2020
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. city = input()
  2. volume = float(input())
  3.  
  4. salary = 0
  5. if city == "Sofia":
  6. if 0 <= volume <= 500:
  7. salary += volume * 0.05
  8. elif 500 <= volume <= 1000:
  9. salary += volume * 0.07
  10. elif 1000 < volume <= 10000:
  11. salary += volume * 0.08
  12. elif volume > 10000:
  13. salary += volume * 0.12
  14.  
  15. if city == "Varna":
  16. if 0 <= volume <= 500:
  17. salary += volume * 0.045
  18. elif 500 < volume <= 1000:
  19. salary += volume * 0.075
  20. elif 1000 < volume <= 10000:
  21. salary += volume * 0.1
  22. elif volume > 10000:
  23. salary += volume * 0.13
  24.  
  25.  
  26. if city == "Plovdiv":
  27. if 0 <= volume <= 500:
  28. salary += volume * 0.055
  29. elif 500 < volume <= 1000:
  30. salary += volume * 0.08
  31. elif 1000 <= volume <= 10000:
  32. salary += volume * 0.12
  33. elif volume > 10000:
  34. salary += volume * 0.145
  35.  
  36.  
  37. if city != "Varna" and city != "Sofia" and city != "Plovdiv" or volume < 0:
  38. print("error")
  39. else:
  40. print(f'{salary:.2f}')
  41.  
Add Comment
Please, Sign In to add comment