First commit
This commit is contained in:
commit
c396581361
20
essence.py
Normal file
20
essence.py
Normal 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")
|
Loading…
Reference in New Issue
Block a user