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