20 lines
370 B
Python
20 lines
370 B
Python
def convert(val: float,unite: str):
|
|
if unite == "g":
|
|
livre = val * 0.002205
|
|
print(livre, end=" l")
|
|
|
|
if unite == "m":
|
|
pied = val / 0.3048
|
|
print(pied, end=" p")
|
|
|
|
if unite == "c":
|
|
fahr = 32 + 1.8 * val
|
|
print(fahr, end=" f")
|
|
|
|
print()
|
|
|
|
|
|
|
|
|
|
valeur, unite = input().split()
|
|
convert(float(valeur),unite) |