-
Notifications
You must be signed in to change notification settings - Fork 0
/
1014.py
20 lines (14 loc) · 667 Bytes
/
1014.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Calcule o consumo médio de um automóvel sendo fornecidos a distância total percorrida (em Km) e o total de combustível gasto (em litros).
# Entrada
# O arquivo de entrada contém dois valores: um valor inteiro X representando a distância total percorrida (em Km), e
# um valor real Y representando o total de combustível gasto, com um dígito após o ponto decimal.
# Saída
# Apresente o valor que representa o consumo médio do automóvel com 3 casas após a vírgula, seguido da mensagem "km/l".
# Exemplo de Entrada Exemplo de Saída
# 500
# 35.0
# 14.286 km/l
x = int(input())
y = float(input())
consumo = float (x/y)
print('%0.3f km/l' %consumo)