1134.Type of Fuel in python
This is the solution of this problem in python:
Alcohol=0
Gasoline=0
Diesel=0
while(1):
x=int(input())
if(x==4):
break
elif(x==1):
Alcohol+=1
elif(x==2):
Gasoline+=1
elif(x==3):
Diesel+=1
else:
continue
print("MUITO OBRIGADO")
print("Alcool: %i"%Alcohol)
print("Gasolina: %i"%Gasoline)
print("Diesel: %i"%Diesel)
No comments