1 – Déclarer une liste avec 5 notes sur 20 puis afficher la liste et son type.
![](https://yb-isn.fr/2021/nsi/raphaelle/wp-content/uploads/sites/4/2021/10/image-14.png)
![](https://yb-isn.fr/2021/nsi/raphaelle/wp-content/uploads/sites/4/2021/10/image-15.png)
Corrigé :
![](https://yb-isn.fr/2021/nsi/raphaelle/wp-content/uploads/sites/4/2021/10/image-17.png)
2 – Écrire une ligne de code pour connaitre le nombre de notes sans voir le tableau
![](https://yb-isn.fr/2021/nsi/raphaelle/wp-content/uploads/sites/4/2021/10/image-16.png)
Corrigé :
![](https://yb-isn.fr/2021/nsi/raphaelle/wp-content/uploads/sites/4/2021/10/image-18.png)
3 – Ajouter une note à la liste puis vérifier qu’elle a bien été ajoutée
![](https://yb-isn.fr/2021/nsi/raphaelle/wp-content/uploads/sites/4/2021/10/image-19.png)
Corrigé :
![](https://yb-isn.fr/2021/nsi/raphaelle/wp-content/uploads/sites/4/2021/10/image-20.png)
![](https://yb-isn.fr/2021/nsi/raphaelle/wp-content/uploads/sites/4/2021/10/image-21.png)
4 – Supprimer la dernière note
![](https://yb-isn.fr/2021/nsi/raphaelle/wp-content/uploads/sites/4/2021/10/image-22.png)
Corrigé :
![](https://yb-isn.fr/2021/nsi/raphaelle/wp-content/uploads/sites/4/2021/10/image-23.png)
5 – Écrire une fonction qui calcule la moyenne des notes puis la tester
![](https://yb-isn.fr/2021/nsi/raphaelle/wp-content/uploads/sites/4/2021/10/image-24.png)
6 – Ajouter un devoir ou vous avez été absent. « Abs » à la place de la note.
![](https://yb-isn.fr/2021/nsi/raphaelle/wp-content/uploads/sites/4/2021/10/image-34.png)
7 – Calculer la moyenne des notes
![](https://yb-isn.fr/2021/nsi/raphaelle/wp-content/uploads/sites/4/2021/10/image-32.png)
8 – Écrire une nouvelle fonction qui calcule correctement la moyenne en tenant compte de l’absence
![](https://yb-isn.fr/2021/nsi/raphaelle/wp-content/uploads/sites/4/2021/10/image-35.png)
9 – Vous avez été autorisé à rattraper le devoir ; remplacer « abs » par votre note puis calculer la moyenne avec les deux fonctions
![](https://yb-isn.fr/2021/nsi/raphaelle/wp-content/uploads/sites/4/2021/10/image-36.png)
![](https://yb-isn.fr/2021/nsi/raphaelle/wp-content/uploads/sites/4/2021/10/image-37.png)
Lien des exercices sur colab : https://colab.research.google.com/drive/1MrhOSZw-q_iijyFkwkj1VyhAS9AhwBiG#scrollTo=xY1tfWAQpot1
Lien des corrigés : https://colab.research.google.com/drive/18JUxK2-2hFcbCavAB8hdJS0cVTIggYdz?usp=sharing
Aucune réponse