BbJLeB

08. Fuel Tank

May 10th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. # 08. Fuel Tank
  2. fuel_type = input() # "Diesel", "Gasoline" or "Gas"
  3. liters_fuel = int(input())  # if liters > 25 is enough
  4.  
  5. if fuel_type == "Diesel" or fuel_type == "Gasoline" or fuel_type == "Gas":
  6.     if liters_fuel >= 25:
  7.         print(f"You have enough {fuel_type.lower()}.")
  8.     elif liters_fuel < 25:
  9.         print(f"Fill your tank with {fuel_type.lower()}!")
  10. else:
  11.     print("Invalid fuel!")
Advertisement
Add Comment
Please, Sign In to add comment