First commit

This commit is contained in:
Dariane Fadoras 2022-09-05 23:58:23 +02:00
commit c396581361

20
essence.py Normal file
View File

@ -0,0 +1,20 @@
#distance
distance = []
km = float(input("Distance parcourue (km) : "))
distance.append(km)
#litres
debit = []
L = float(input("Quantite d'essence consommee (L) : "))
debit.append(L)
#affichage_resultats
#(L/km)*100
for i in range(len(distance)) :
calc =(debit[i]/distance[i])*100
print(f"{calc:.3f} L/100km")