SHARE
TWEET

Untitled

Veselina_M Feb 27th, 2020 84 in 137 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. city=input()
  2. is_sofia=city=="Sofia"
  3. is_plovdiv=city=="Plovdiv"
  4. is_varna=city=="Varna"
  5.  
  6. s=float(input())
  7.  
  8. commission=0
  9.  
  10. if is_sofia:
  11.     if 0<=s<=500:
  12.         commission=s*0.05
  13.     elif 500<s<=1000:
  14.         commission=s*0.07
  15.     elif 1000<s<=10000:
  16.         commission=s*0.08
  17.     elif s>10000:
  18.         commission=s*0.12
  19.     else:
  20.         print("error")
  21. elif is_varna:
  22.     if 0<=s<=500:
  23.         commission=s*0.045
  24.     elif 500<s<=1000:
  25.         commission=s*0.075
  26.     elif 1000<s<=10000:
  27.         commission=s*0.10
  28.     elif s>10000:
  29.         commission=s*0.13
  30.     else:
  31.         print("error")
  32. elif is_plovdiv:
  33.     if 0<=s<=500:
  34.         commission=s*0.055
  35.     elif 500<s<=1000:
  36.         commission=s*0.08
  37.     elif 1000<s<=10000:
  38.         commission=s*0.12
  39.     elif s>10000:
  40.         commission=s*0.145
  41.     else:
  42.         print("error")
  43. else:
  44.     print("error")
  45.  
  46. if commission!=0:
  47.     print(f"{commission:.2f}")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top