Skip to content
Snippets Groups Projects
Commit fd42da47 authored by Gicquel Thibaut's avatar Gicquel Thibaut
Browse files

Update INF-TC1-td02.ipynb

parent 59809971
No related branches found
No related tags found
No related merge requests found
...@@ -247,7 +247,12 @@ ...@@ -247,7 +247,12 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"def average_grade(L: list)-> int:\n", "def average_grade(L: list)-> int:\n",
" # YOUR CODE HERE\n", " if len(L) == 0:
return 'Pas de note disponible'
avg = 0
for i in range(len(L)):
avg += float(L[i]['note'])
return avg/len(L)\n",
" raise NotImplementedError()" " raise NotImplementedError()"
] ]
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment