This commit is contained in:
Samuel Vermeulen 2023-01-06 17:21:10 +01:00
parent a0d0d4d8b7
commit 9aaeea6c79

View File

@ -0,0 +1,20 @@
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)