Advertisement
Guest User

Untitled

a guest
Jan 25th, 2020
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. town = input()
  2. sells = float(input())
  3. commision = 0
  4.  
  5. if town == 'Sofia':
  6. if sells <= 0 and sells <= 500:
  7. commision = sells * 0.050
  8. elif sells < 500 and sells <= 1000:
  9. commision = sells * 0.070
  10. elif sells > 1000 and sells <= 10000:
  11. commision = sells * 0.080
  12. elif sells > 12000:
  13. commision = sells * 0.012
  14. print(f'{commision:.2f}')
  15.  
  16. elif town == 'Varna':
  17. if sells <= 0 and sells <= 500:
  18. commision = sells * 0.045
  19. elif sells > 500 and sells <= 1000:
  20. commision = sells * 0.075
  21. elif sells > 1000 and sells <= 10000:
  22. commision = sells * 0.10
  23. elif sells > 12000:
  24. commision = sells * 0.13
  25. print(f'{commision:.2f}')
  26.  
  27. elif town == 'Plovdiv':
  28. if sells <= 0 and sells <= 500:
  29. commision = sells * 0.55
  30. elif sells > 500 and sells <= 1000:
  31. commision = sells * 0.80
  32. elif sells > 1000 and sells <= 10000:
  33. commision = sells * 0.120
  34. elif sells > 12000:
  35. commision = sells * 0.145
  36. print(f'{commision:.2f}')
  37.  
  38.  
  39. else:
  40. print('error')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement