up
This commit is contained in:
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)
|
||||||
Reference in New Issue
Block a user