DerioFT

1134.py

Oct 26th, 2021
961
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. alcool = 0
  2. gasolina = 0
  3. diesel = 0
  4.  
  5. while True:
  6.  
  7.     user_input = int(input())
  8.  
  9.     if user_input >= 1 and user_input <= 4:
  10.  
  11.         if user_input == 1:
  12.             alcool += 1
  13.  
  14.         if user_input == 2:
  15.             gasolina += 1
  16.  
  17.         if user_input == 3:
  18.             diesel += 1
  19.  
  20.         if user_input == 4:
  21.             break
  22.  
  23. print("MUITO OBRIGADO")
  24. print("Alcool:", alcool)
  25. print("Gasolina:", gasolina)
  26. print("Diesel:", diesel)
  27.  
Advertisement
Add Comment
Please, Sign In to add comment