Salut
def average(listeNotes , listeCoefficients):
# initialisation de la moyenne
average = 0
# somme des coefficients initialisé
sumCoefficients = 0
for i in range(0 , len(listeNotes)):
# calculer la somme des coefficients*notes
average = average + listeNotes[i] * listeCoefficients[i]
# calculer la somme des coefficients
sumCoefficients = sumCoefficients + listeCoefficients[i]
average = average/sumCoefficients
return average
listeNotes = [16 , 14 , 12 ]
listeCoefficients = [2 , 1 , 4 ]
print("La moyenne est : " , average(listeNotes , listeCoefficients))