Advertisement
GalinaKG

Untitled

Apr 28th, 2022
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. type_fuel = input()
  2. litres_fuel = float(input())
  3. club_card = input()
  4. price = 0
  5.  
  6. if club_card == 'Yes':
  7. if type_fuel == 'Gas':
  8. price = (0.93 - 0.08) * litres_fuel
  9. elif type_fuel == 'Gasoline':
  10. price = (2.22 - 0.18) * litres_fuel
  11. else:
  12. price = (2.33 - 0.12) * litres_fuel
  13. else:
  14. if type_fuel == 'Gas':
  15. price = 0.93 * litres_fuel
  16. elif type_fuel == 'Gasoline':
  17. price = 2.22 * litres_fuel
  18. else:
  19. price = 2.33 * litres_fuel
  20.  
  21. if litres_fuel > 25:
  22. price -= (price * 0.10)
  23. elif litres_fuel >= 20:
  24. price -= (price * 0.08)
  25.  
  26. print(f'{price:.2f} lv.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement