9/9: How is Everybody Doing?


#1



https://www.codecademy.com/fr/courses/python-beginner-fr-FR-wdjot/1/5?curriculum_id=5370f030fed2a866a2000001#


Who can help me please to pass this level ?

def calcul_classe_moyenne(etudiants):
resultats = []
for etudiant in classe:
resultats.append(calcule_moyenne(etudiant))
return moyenne(resultats)
etudiants = [lloyd, alice, tyler]
print calcul_classe_moyenne(etudiants)
print ecrire_lettre_note(calcul_classe_moyenne(etudiants))

Error message in the console is :

B
Traceback (most recent call last):
** File "python", line 52, in **
NameError: name 'calcul_moyenne' is not defined

Thank you.



#2

Hi first your for loop

for etudiant in classe:

that error

NameError: name 'calcul_moyenne' is not defined

come frome here beause you didn't define classe ....but you should loop throught etudiants instead of classe


#3

Hola Wizmarco.

I resolved it and this is the end of my code :

def calcule_classe_moyenne(etudiants):
resultats = []
for etudiant in etudiants:
resultats.append(calcule_moyenne(etudiant))
return moyenne(resultats)
etudiants = [lloyd, alice, tyler]

print calcul_classe_moyenne(etudiants)
print ecrire_lettre_note(calcul_classe_moyenne)

I have forgotten the "e" on "calcule" in the definition of my function.
Thank you for your response.