Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- town = input()
- sells = float(input())
- commision = 0
- if town == 'Sofia':
- if sells <= 0 and sells <= 500:
- commision = sells * 0.050
- elif sells < 500 and sells <= 1000:
- commision = sells * 0.070
- elif sells > 1000 and sells <= 10000:
- commision = sells * 0.080
- elif sells > 12000:
- commision = sells * 0.012
- print(f'{commision:.2f}')
- elif town == 'Varna':
- if sells <= 0 and sells <= 500:
- commision = sells * 0.045
- elif sells > 500 and sells <= 1000:
- commision = sells * 0.075
- elif sells > 1000 and sells <= 10000:
- commision = sells * 0.10
- elif sells > 12000:
- commision = sells * 0.13
- print(f'{commision:.2f}')
- elif town == 'Plovdiv':
- if sells <= 0 and sells <= 500:
- commision = sells * 0.55
- elif sells > 500 and sells <= 1000:
- commision = sells * 0.80
- elif sells > 1000 and sells <= 10000:
- commision = sells * 0.120
- elif sells > 12000:
- commision = sells * 0.145
- print(f'{commision:.2f}')
- else:
- print('error')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement