Advertisement
mbstanchev

Untitled

Jan 27th, 2022
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. type_of_fuel = input()
  2. fuel_in_tank = float(input())
  3. fuel = ""
  4.  
  5. if not type_of_fuel == "Diesel" or type_of_fuel == "Gasoline" or type_of_fuel == "Gas":
  6. print(f"Invalid fuel!")
  7. else:
  8. if fuel_in_tank >= 25:
  9. if type_of_fuel == "Diesel":
  10. fuel = "diesel"
  11. elif type_of_fuel == "Gasoline":
  12. fuel = "gasoline"
  13. elif type_of_fuel == "Gas":
  14. fuel = "gas"
  15. print(f"You have enough {fuel}!")
  16.  
  17. if fuel_in_tank < 25:
  18. if type_of_fuel == "Diesel":
  19. fuel = "diesel"
  20. elif type_of_fuel == "Gasoline":
  21. fuel = "gasoline"
  22. elif type_of_fuel == "Gas":
  23. fuel = "gas"
  24. print(f"Fill your tank with {fuel}!")
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement