Advertisement
pacho_the_python

Untitled

Jun 29th, 2023
825
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. fuel_type = input()
  2. fuel_liters = int(input())
  3.  
  4. if fuel_type == "Diesel":
  5.     if fuel_liters >= 25:
  6.         print("You have enough diesel.")
  7.     else:
  8.         print("Fill your tank with diesel!")
  9. elif fuel_type == "Gasoline":
  10.     if fuel_liters >= 25:
  11.         print("You have enough gasoline.")
  12.     else:
  13.         print("Fill your tank with gasoline!")
  14. elif fuel_type == "Gas":
  15.     if fuel_liters >= 25:
  16.         print("You have enough gas.")
  17.     else:
  18.         print("Fill your tank with gas!")
  19. else:
  20.     print("Invalid fuel!")
  21.  
  22.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement