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