Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- city = input()
- volume = float(input())
- salary = 0
- if city == "Sofia":
- if 0 <= volume <= 500:
- salary += volume * 0.05
- elif 500 <= volume <= 1000:
- salary += volume * 0.07
- elif 1000 < volume <= 10000:
- salary += volume * 0.08
- elif volume > 10000:
- salary += volume * 0.12
- if city == "Varna":
- if 0 <= volume <= 500:
- salary += volume * 0.045
- elif 500 < volume <= 1000:
- salary += volume * 0.075
- elif 1000 < volume <= 10000:
- salary += volume * 0.1
- elif volume > 10000:
- salary += volume * 0.13
- if city == "Plovdiv":
- if 0 <= volume <= 500:
- salary += volume * 0.055
- elif 500 < volume <= 1000:
- salary += volume * 0.08
- elif 1000 <= volume <= 10000:
- salary += volume * 0.12
- elif volume > 10000:
- salary += volume * 0.145
- if city != "Varna" and city != "Sofia" and city != "Plovdiv" or volume < 0:
- print("error")
- else:
- print(f'{salary:.2f}')
Add Comment
Please, Sign In to add comment