Sichanov

fuel tank

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