up
This commit is contained in:
parent
a0d0d4d8b7
commit
9aaeea6c79
20
Fonctions/convertisseur.py
Normal file
20
Fonctions/convertisseur.py
Normal 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)
|
Loading…
x
Reference in New Issue
Block a user