Advertisement
simeonshopov

Fuel tank part 2

Sep 11th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. type=input()
  2. fuel=float(input())
  3. club=input()
  4.  
  5. if type=="Gas" and club=="Yes":
  6.   price=fuel*0.85
  7. elif type=="Gas" and club=="No":
  8.   price=fuel*0.93
  9.  
  10. if type=="Gasoline" and club=="Yes":
  11.   price=fuel*2.04
  12. elif type=="Gasoline" and club=="No":
  13.   price=fuel*2.22
  14.  
  15. if type=="Diesel" and club=="Yes":
  16.   price=fuel*2.21
  17. elif type=="Diesel" and club=="No":
  18.   price=fuel*2.33
  19.  
  20. if 20<fuel<=25:
  21.   price*=0.92
  22. elif fuel>25:
  23.   price*=0.90
  24. else:
  25.   price=price
  26.  
  27. print(f"{price:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement