diff --git a/Notebooks/05_Les_variables.ipynb b/Notebooks/05_Les_variables.ipynb
index 00dede0d9aae21c1cb9b94f30a30b48ac8fd57d5..47e64b26b1511fd8b3a4525a15a1759a4d918eb8 100644
--- a/Notebooks/05_Les_variables.ipynb
+++ b/Notebooks/05_Les_variables.ipynb
@@ -1 +1 @@
-{"cells":[{"metadata":{},"cell_type":"markdown","source":"<div class=\"alert alert-danger\" style=\"border-left:5px solid #a94442;border-radius: 5px;\">\n    \n- **veillez à bien sauvegarder votre travail** dans le bon dossier du disque réseau (dossier document) avec le bon nom (et l'extension *.ipynb*), **sinon toutes les modifications seront perdues!**\n    \n- Pour reprendre votre travail, il suffit d'ouvrir le fichier .ipynb en cliquant sur *Fichier ouvrir*\n\n- **Ce notebook doit être ouvert avec Basthon. Si en haut à droite vous voyez le symbole de Jupyter alors allez sur [Basthon](https://notebook.basthon.fr) pour ouvrir ce notbook.**\n\n\n</div>\n\n\n\n\n# 5. Les variables\n\nDans cette leçon, nous allons étudier le concept de variables. Dans la leçon 4 sur les fonctions avec paramètres, nous avons vu qui'il était possible de paramètrer les fonctions afin que leur comportement varient. Ces paramètres permettent d'indiquer, par exemple, que\n\n- qu'une fonction `rect(d, e)` trace un rectangle où les paramètres `d, e` donnent les dimensions du rectangle.\n- qu'une fonction `maison(c)` dessine une maison où `c` permet de spécifier la couleur du rectangle.\n\n## Qu'est-ce qu'une variable ?\n\nEn programmation, une variable est un espace réservé en mémoire pour stocker des valeurs qui peuvent être utilisées et modifiées dans vos programmes. Pensez-y comme une boîte avec un nom que vous pouvez utiliser pour stocker et récupérer des informations."},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> &nbsp; Quizz </h3> \n\n```\nQu'est-ce qu'une variable en Python ?\n\nA) Un type de données\nB) Un opérateur de mathématiques\nC) Un espace réservé pour stocker des valeurs\nD) Une fonction\n```"},{"metadata":{},"cell_type":"raw","source":"Ma réponse: "},{"metadata":{},"cell_type":"markdown","source":"<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nSolution\n</summary>  \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\nC) Un espace réservé pour stocker des valeurs\n</div>\n</details>"},{"metadata":{},"cell_type":"markdown","source":"## Règles de Nommage\n1. Le nom d'une variable doit commencer par une lettre ou un underscore (_).\n2. Le nom ne peut pas commencer par un chiffre.\n3. Le nom peut contenir uniquement des lettres, des chiffres et des underscores.\n4. Les noms de variables sont sensibles à la casse (age, Age et AGE sont différents).\n\n<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> &nbsp; Quizz </h3> \n \n```\nQuel nom de variable est invalide en Python ?\n\nA) nom\nB) _var3\nC) 3variable\nD) variableNom\n```"},{"metadata":{},"cell_type":"raw","source":"Ma réponse: "},{"metadata":{},"cell_type":"markdown","source":"<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nSolution\n</summary>  \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\nB) _var3    et    C) 3variable\n</div>\n</details>"},{"metadata":{},"cell_type":"markdown","source":"## Création et Affectation de Variables\n\nPour créer une variable en Python, il vous suffit de choisir un nom et de lui affecter une valeur à l'aide du signe égal `=`.\n\n```python\n# Exemple de création de variables\nage = 17\nnom = \"Alice\"\npi = 3.14159\n```\n\n## Exemples d'utilisation de variables\n\n### Exemple 1 : Faire des calculs\nLes variables permettent de stocker des données et de les faire évoluer. Lorsque les variables contiennent des données numériques, il est possible de faire des caculs en tutilisant les opérateurs `+`, `-`, `*`, `/` et `**`ainis que `%` et `//` si ce sont des valeurs entières. Par exemple, si on teste le programme suivant"},{"metadata":{"trusted":true},"cell_type":"code","source":"r = 2\npi = 3.14159\nA = pi*r**2\nprint(\"L'aire d'un disque de rayon \",r,\" vaut \", A)","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"On obtient un programme qui affiche l'aire d'un disque de rayon 2.\n\n### Exemple 2 : Apporter des variation à des répétitions\n\nOn peut modifier une variable à chaque itération d'une boucle `for`. On peut, par exemple, utiliser une variable pour afficher une table de mutiliplication. Vérifier que le programme suivant affiche bien la table de multiplication de 7:"},{"metadata":{"trusted":true,"scrolled":true},"cell_type":"code","source":"n = 1\nfor _ in range(10):\n    print(n, \" x 7 =\", n*7)\n    n = n + 1","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Pour ajouter 1 à la variable `n`, on écrit `n = n + 1` qui consiste à remplacer la valeur de `n` par son ancienne valeur plus 1.\n\nOn peut utiliser un procéder similaire pour tracer une spirales, comme le fait le programme suivant:"},{"metadata":{"trusted":true},"cell_type":"code","source":"from turtle import *\n\ndef triangle(l):\n    for _ in range(3):\n        forward(l)\n        left(120)\n        \nx = 20\nfor _ in range(4):\n    triangle(x)\n    forward(x + 10)\n    x = x + 20\n    \ndone()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"\n\n### Exemple 3 : Utiliser avec une fonction avec paramètre. \n\nOn peut utiliser la valeur d'une variable comme argument d'une fonction. Le programme suivant va permettre de dessiner des triangles de plus en plus grands:"},{"metadata":{"trusted":true},"cell_type":"code","source":"from turtle import *\n        \nx = 20\nfor _ in range(30):\n    forward(x)\n    left(90)\n    x = x + 10\n    \ndone()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Exercices\n\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> &nbsp; Exercice 1 </h3>\n\nTransformez le i vers un i avec trema (deux points).\n"},{"metadata":{"trusted":true},"cell_type":"code","source":"","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"name":"python3","display_name":"Python 3","language":"python"}},"nbformat":4,"nbformat_minor":2}
\ No newline at end of file
+{"cells":[{"metadata":{},"cell_type":"markdown","source":"<div style=\"padding:20px;background-color:papayawhip;\" >\n    \n<h3 style=\"color:chocolate\"> <i class=\"fa fa-info\" aria-hidden=\"true\"> </i> &nbsp; Remarque introductive &nbsp;  <i class=\"fa fa-info\" aria-hidden=\"true\"></h3> \n<p> Ce fichier est fait pour être lu sur le site <a href=\"https://notebook.basthon.fr/\"><img src='https://notebook.basthon.fr/assets/efede5218c9087496f16.png' style=\"border: 0; display:inline; margin: 0 5px; height:30px\" alt=\"Basthon\"/></a>. <br>\n    \nSi vous l'avez ouvert avec un autre programme, comme Jupyter notebook, vous riquez de rencontrer quelques bugs. <br>\nVeuillez cliquez sur <a href=\"https://notebook.basthon.fr/\">ce lien</a> et y charger ce fichier à l'aide du bouton \"Ouvrir\"  &nbsp; <i class=\"fa fa-folder\" aria-hidden=\"true\"> </i>\n</p> \n</div>"},{"metadata":{},"cell_type":"markdown","source":"# 5. Les variables\n\nDans cette leçon, nous allons étudier le concept de variables. Dans la leçon 4 sur les fonctions avec paramètres, nous avons vu qui'il était possible de paramètrer les fonctions afin que leur comportement varient. Ces paramètres permettent d'indiquer, par exemple, que\n\n- qu'une fonction `rect(d, e)` trace un rectangle où les paramètres `d, e` donnent les dimensions du rectangle.\n- qu'une fonction `maison(c)` dessine une maison où `c` permet de spécifier la couleur du rectangle.\n\n## Qu'est-ce qu'une variable ?\n\nEn programmation, une variable est un espace réservé en mémoire pour stocker des valeurs qui peuvent être utilisées et modifiées dans vos programmes. Pensez-y comme une boîte avec un nom que vous pouvez utiliser pour stocker et récupérer des informations.\n\n<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> &nbsp; Quizz </h3> \n\n```\n✍️  Qu'est-ce qu'une variable en Python ?\n\nA) Un type de données\nB) Un opérateur de mathématiques\nC) Un espace réservé pour stocker des valeurs\nD) Une fonction\n```"},{"metadata":{},"cell_type":"raw","source":"Votre réponse: "},{"metadata":{},"cell_type":"markdown","source":"<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nLa solution\n</summary>  \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\nC) Un espace réservé pour stocker des valeurs\n</div>\n</details>"},{"metadata":{},"cell_type":"markdown","source":"## Règles de Nommage\n1. Le nom d'une variable doit commencer par une lettre ou un underscore (_).\n2. Le nom ne peut pas commencer par un chiffre.\n3. Le nom peut contenir uniquement des lettres, des chiffres et des underscores.\n4. Les noms de variables sont sensibles à la casse (age, Age et AGE sont différents).\n\n<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> &nbsp; Quizz </h3> \n \n```\n✍️ Quel nom de variable est invalide en Python ?\n\nA) nom\nB) _var3\nC) 3variable\nD) variableNom\n```"},{"metadata":{},"cell_type":"raw","source":"Votre réponse: "},{"metadata":{},"cell_type":"markdown","source":"<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nLa solution\n</summary>  \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\nB) _var3    et    C) 3variable\n</div>\n</details>"},{"metadata":{},"cell_type":"markdown","source":"## Création et Affectation de Variables\n\nPour créer une variable en Python, il vous suffit de choisir un nom et de lui affecter une valeur à l'aide du signe égal `=`.\n\n```python\n# Exemple de création de variables\nage = 17\nnom = \"Alice\"\npi = 3.14159\n```\n\n## Exemples d'utilisation de variables\n\n### Exemple 1 : Faire des calculs\nLes variables permettent de stocker des données et de les faire évoluer. Lorsque les variables contiennent des données numériques, il est possible de faire des caculs en tutilisant les opérateurs `+`, `-`, `*`, `/` et `**`ainis que `%` et `//` si ce sont des valeurs entières. Par exemple, si on teste le programme suivant"},{"metadata":{"trusted":true},"cell_type":"code","source":"r = 2\npi = 3.14159\nA = pi*r**2\nprint(\"L'aire d'un disque de rayon \",r,\" vaut \", A)","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"On obtient un programme qui affiche l'aire d'un disque de rayon 2.\n\n### Exemple 2 : Apporter des variations à des répétitions\n\nOn peut modifier une variable à chaque itération d'une boucle `for`. On peut, par exemple, utiliser une variable pour afficher une table de mutiliplication. Vérifier que le programme suivant affiche bien la table de multiplication de 7:"},{"metadata":{"trusted":true,"scrolled":true},"cell_type":"code","source":"n = 1\nfor _ in range(10):\n    print(n, \" x 7 =\", n*7)\n    n = n + 1","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Pour ajouter 1 à la variable `n`, on écrit `n = n + 1` qui consiste à remplacer la valeur de `n` par son ancienne valeur plus 1.\n\nOn peut utiliser un procéder similaire pour tracer une spirales, comme le fait le programme suivant:"},{"metadata":{"trusted":true,"scrolled":true},"cell_type":"code","source":"from turtle import *\n        \nx = 20\nfor _ in range(30):\n    forward(x)\n    left(90)\n    x = x + 10\n    \ndone()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Exemple 3 : Variables avec une fonction avec paramètre. \n\nOn peut utiliser la valeur d'une variable comme argument d'une fonction. Le programme suivant va permettre de dessiner des triangles de plus en plus grands:"},{"metadata":{"trusted":true},"cell_type":"code","source":"from turtle import *\n\ndef triangle(l):\n    for _ in range(3):\n        forward(l)\n        left(120)\n        \nx = 20\nfor _ in range(4):\n    triangle(x)\n    forward(x + 10)\n    x = x + 20\n    \ndone()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Exercices\n\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> &nbsp; Exercice 1 </h3>\n\nOn considère le programme Python suivant :\n\n```python\na = 4\nb = 5\nc = a + b\nd = c / 2\n```\n\n✍️ **Question 1** : Déterminez mentalement la valeur de la variable `d` à l'issue de ce programme ? "},{"metadata":{},"cell_type":"raw","source":"Votre réponse : "},{"metadata":{},"cell_type":"markdown","source":"🐍 **Question 2** : Recopiez ce programme dans la cellule ci-dessous, puis ajouter un dernière ligne où vous utilisez la fonction `print` pour afficher la valeur de la variable `d` et ainsi valider votre réponse."},{"metadata":{"trusted":true},"cell_type":"code","source":"# recopiez votre programme ici","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"🐍 **Question 3** : Exécutez la cellule ci-dessous puis exécutez le programme ligne par ligne avec les boutons <button class='fa'>Forward ></button> et <button class='fa'>&lt; Back</button> pour bien comprendre son fonctionnement.\n\n> On utilise ici les fonctionnalités de la bibliothèque `tutor` qui permet d'exécuter un programme ligne par ligne."},{"metadata":{"trusted":true},"cell_type":"code","source":"from tutor import tutor  # on importe la fonction tutor de la bibliothèque tutor\n\na = 15\nb = 10\nc = a + b\nd = c / 2\n\ntutor()  # on utilise cette fonction pour visualiser le programme ligne par ligne","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"🐍 **Question 4** : On considère maintenant que `a` et `b` correspondent à des notes. Réécrivez le programme en utilisant des noms de variables plus représentatifs (pour les 4 variables)."},{"metadata":{"trusted":true},"cell_type":"code","source":"# recopiez votre programme ici","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> &nbsp; Exercice 2 </h3>\n\nOn considère le programme Python suivant :\n\n```python\na = 10\nb = 3\na = a - 4\nb = 2 * b\na = a + b\nprint(a)\n```\n\n✍️ **Question 1** : Combien de variables sont utilisées ? Donnez leurs noms."},{"metadata":{},"cell_type":"raw","source":"Votre réponse : "},{"metadata":{},"cell_type":"markdown","source":"<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nLa solution\n</summary>  \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\n    \nIl y a deux variable `a` et `b`\n</div>\n</details>"},{"metadata":{},"cell_type":"markdown","source":"✍️ **Question 2** : Déterminez mentalement la valeur finale de la variable `a` ?"},{"metadata":{},"cell_type":"raw","source":"Votre réponse : "},{"metadata":{},"cell_type":"markdown","source":"🐍 **Question 3** : Vérifiez votre réponse en recopiant le programme dans la cellule ci-dessous puis en exécutant ce programme."},{"metadata":{"trusted":true},"cell_type":"code","source":"# recopiez votre programme ici","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> &nbsp; Exercice 3 </h3>\n\nOn doit écrire un programme Python qui effectue le opérations suivantes.\n\n-   Créer une variables `A` qui prend la valeur 5\n-   Multiplier A par 3\n-   Soustraire 4 au résultat\n-   Elever le résultat au carré\n-   Afficher le résultat\n\nChaque ligne correspond à une ligne de code Python.\n\n🐍 **Question** : Écrivez un programme Python permettant de coder ce programme. Vérifiez ensuite en l'exécutant.  **Le programme doit faire 5 lignes de code et afficher 121**"},{"metadata":{"trusted":true},"cell_type":"code","source":"# recopiez votre programme ici","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"!!! info Nom des variables\nIl n'y avait pas de contexte particulier dans les deux dernier exercices, c’est pourquoi on a utilisé des noms de variables peu représentatifs. Le but principal de ces exercces était  de faire ancrer les notions étudiées plus haut dans le document.\n!!!"},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> &nbsp; Exercice 4 </h3>\n\nComplétez les programme ci-dessous (remplacez les `...`)  afin qu’ils effectuent la bonne tâche.\n\n**Programme A** <br>\nLe programme A doit afficher les nombre des 10 à 60, de 10 en 10"},{"metadata":{"trusted":true},"cell_type":"code","source":"x = ...\nfor _ in range(...):\n    print(x)\n    x = ...","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"**Programme B**  <br>\nLe programme B doit faire un compte-à-rebours de 10 à 0:"},{"metadata":{"trusted":true},"cell_type":"code","source":"...\nfor _ in range(...):\n    print(...)\n    ...\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"**Programme C** <br>\nLe programme C écrit les 8 premiers multiples de 7:"},{"metadata":{"trusted":true},"cell_type":"code","source":"...\nfor _ in range(...):\n    print()\n    ...","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> &nbsp; Exercice 5 </h3>\n\nInspirez vous de l'exemple 2 ci-dessus pour compléter le programme Python ci-dessous afin qu'il trace la figure suivante.\n![Image carres colorés](https://githepia.hesge.ch/info_sismondi/exercices-1ere/-/raw/main/Notebooks/imgs_chap5/img_exo_spirale.png)\n\n*Indications:*\n- *On supposera que le côté d’un carré est 50 pixels.*\n- *La flèche représente la position initiale de la tortue.*\n- *Le quadrillage ne doit pas être tracé il est là seulement pour connaître les dimensions de la spirale.*\n- **Vous ne devez par rajouter plus de 5 lignes de code**"},{"metadata":{"trusted":true,"scrolled":false},"cell_type":"code","source":"from turtle import *\n\nspeed(9) # pour dessiner plus vite\n\n# pour positionner le curseur en bas à gauche\npenup()\ngoto(-200, -200)\npendown()\n\n# mettre le bon style de trait\nwidth(5)\ncolor(\"red\")\n\n# à compléter avec maximum 5 lignes\n\ndone()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> &nbsp; Exercice 6 </h3>\n\nInspirer de l'exemple 2 ci-dessus pour compléter le programme Python ci-dessous afin qu'il trace la figure suivante.\n![Image carres colorés](https://githepia.hesge.ch/info_sismondi/exercices-1ere/-/raw/main/Notebooks/imgs_chap5/img_exo_2spirales.png)\n\n*Indications:*\n- *On supposera que le côté d’un carré est 50 pixels.*\n- *La flèche représente la position initiale de la tortue.*\n- *Le quadrillage ne doit pas être tracé il est là seulement pour connaître les dimensions de la figure.*\n- **Vous ne devez par rajouter plus de 13 lignes de code**"},{"metadata":{"trusted":true,"scrolled":false},"cell_type":"code","source":"from turtle import *\n\nspeed(9) # pour dessiner plus vite\n\n# pour positionner le curseur en bas à gauche\npenup()\ngoto(0, -100)\npendown()\n\n\nwidth(5) # trait épais\n\n# à compléter avec maximum 13 lignes\n\ndone()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> &nbsp; Exercice 7 </h3>\n\n1. Testez le programme suivant (voir plus bas pour tester) :\n\n```Python\nfrom turtle import *\n\n# pour être à gauche du canevas\nbackward(250)\n\n# Code à factoriser\nfor k in range(3):\n    forward(30)\n    right(120)\nforward(30)\nfor k in range(3):\n    forward(60)\n    right(120)\nforward(60)\nfor k in range(3):\n    forward(90)\n    right(120)\nforward(90)\nfor k in range(3):\n    forward(120)\n    right(120)\nforward(120)\nfor k in range(3):\n    forward(150)\n    right(120)\n\ndone()\n```\n2. Définissez une fonction `triangle(l)`, qui permet de tracer des triangles équilatéraux de longueur `l`, et utilisez-là pour réduire le nombre d’instructions du programme.\n\n**NB**: Le nombre d'instructions du programme doit être au moins divisé par 2."},{"metadata":{"trusted":true},"cell_type":"code","source":"from turtle import *\n\n# pour être à gauche du canevas\nbackward(250)\n\n# Code à factoriser\nfor _ in range(3):\n    forward(30)\n    right(120)\nforward(30)\nfor _ in range(3):\n    forward(60)\n    right(120)\nforward(60)\nfor _ in range(3):\n    forward(90)\n    right(120)\nforward(90)\nfor _ in range(3):\n    forward(120)\n    right(120)\nforward(120)\nfor _ in range(3):\n    forward(150)\n    right(120)\n\ndone()\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> &nbsp; Exercice 8 </h3>\n\nInspirez vous de l'exemple 3 ci-dessus pour écrire un programme Python ci-dessous afin qu'il trace la figure suivante.\n![Image carres colorés](https://githepia.hesge.ch/info_sismondi/exercices-1ere/-/raw/main/Notebooks/imgs_chap5/img_exo_carres.png)\n\nVotre programme définira une fonction `carre(longueur)` où le paramètre longueur représente la longueur du carré. Puis, le programme utilisera cette fonction dans une boucle.\n\n*Indications:*\n- *On supposera que le côté d’un carré est de 50 pixels.*\n- *La flèche représente la position initiale de la tortue.*\n- *Le quadrillage ne doit pas être tracé il est là seulement pour connaître les dimensions de la figure.*\n- **Vous ne devez par rajouter plus de 8 lignes de code**"},{"metadata":{"trusted":true,"scrolled":false},"cell_type":"code","source":"from turtle import *\n\ndef carre(longueur):\n    # code de la fonction à compléter\n\nspeed(9) # pour dessiner plus vite\n\n# pour positionner le curseur en bas à gauche\npenup()\ngoto(-200, -200)\npendown()\n\n# mettre le bon style de trait\nwidth(5)\ncolor(\"red\")\n\n# à compléter avec une boucle\n\n\ndone()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> &nbsp; Exercice 9 </h3>\n\nInspirez vous de l'exemple 3 ci-dessus pour écrire un programme Python ci-dessous afin qu'il trace la figure suivante.\n![Image carres colorés](https://githepia.hesge.ch/info_sismondi/exercices-1ere/-/raw/main/Notebooks/imgs_chap5/img_exo_triangles.png)\n\nVotre programme définira une fonction `triangles(longueur)` où le paramètre longueur représente la longueur du carré. Puis, le programme utilisera cette fonction dans une boucle.\n\n*Indications:*\n- *On supposera que le côté d’un carré est de 25 pixels.*\n- *La flèche représente la position initiale de la tortue.*\n- *Le quadrillage ne doit pas être tracé il est là seulement pour connaître les dimensions de la figure.*\n- *La taille des triangles diminue de 25 pixels entre chaque triangle.*\n- **Vous ne devez par rajouter plus de 9 lignes de code**"},{"metadata":{"trusted":true,"scrolled":false},"cell_type":"code","source":"from turtle import *\n\ndef triangle(longueur):\n    # code de la fonction à compléter\n\nspeed(9) # pour dessiner plus vite\n\n# pour positionner le curseur en bas à gauche\npenup()\ngoto(-200, -200)\npendown()\n\n# mettre le bon style de trait\nwidth(3)\ncolor(\"red\")\n\n# à compléter avec une boucle\n\n\ndone()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## L'indice d'un boucle `for`, une variable gratuite\n\nIl est possible de remplacer le symbole `_` dans une boucle `for` par le nom d'une variable qu'on appelle l'indice de la boucle. Cette variable sera intitialisée à `0` puis sera incrémenté de `1` après chaque itération. Par exemple le programme \n```python\nk = 0\nfor _ in range(10):\n    print(k)\n    k = k + 1\n```\n\nest équivalent au programme suivant:\n```python\nfor k in range(10):\n    print(k)\n```"},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> &nbsp; Exercice 6 </h3>\n\nRécrire l'exemple 2 de la table de mutliplication de 7 en utilisant un indice de boucle `for`.\n\n```python\nn = 1\nfor _ in range(10):\n    print(n, \" x 7 =\", n*7)\n    n = n + 1\n```\n\n*Indication:*\n- **Votre programme dois contenir seulement 2 lignes**"},{"metadata":{"trusted":true},"cell_type":"code","source":"# votre programme","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"markdown","source":"# 🟥  Fin\n\n<div class=\"alert alert-danger\" style=\"border-left:5px solid #a94442;border-radius: 5px;\">\n    \n- **Ne pas Oublier de sauvegarder son travail.**\n    \n- **Pour effectuer** une sauvegarde personnelle du document obtenu :\n   - utilisez le menu `Fichier / Enregistrer sous…`.\n   - nomez le fichier `variables1.ipynb`\n   - choisissez de sauver votre fichier dans `Documents/1IN/Programmation/Les_variables`.\n\n    </div>\n\n---\n\n#### Remarque générale\n\nCe document c'est inspiré des notebook trouvé sur\n- Les ressources pédagogiques du [Lycée Levavasseur](https://www.levavasseur.xyz/NSI_P/Python/Python.html) \n- Les ressources pédagogiques du [Lycée Mounier](https://info-mounier.fr/snt/python/) \n\nLe notebook est sous license Creative Commons [BY-NC-SA](https://creativecommons.org/licenses/?lang=fr)\n![Licence Creative Commons](https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png)"},{"metadata":{"trusted":true},"cell_type":"code","source":"","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"name":"python3","display_name":"Python 3","language":"python"}},"nbformat":4,"nbformat_minor":2}
\ No newline at end of file
diff --git a/Notebooks/imgs_chap5/img_exo_2spirales.png b/Notebooks/imgs_chap5/img_exo_2spirales.png
new file mode 100644
index 0000000000000000000000000000000000000000..dfa5670fdf4c64955da3544ef33861af0164e329
--- /dev/null
+++ b/Notebooks/imgs_chap5/img_exo_2spirales.png
@@ -0,0 +1,399 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: Tk Canvas Widget
+%%For: mathieu
+%%Title: Window .!canvas
+%%CreationDate: Wed Jan 15 22:25:01 2025
+%%BoundingBox: 117 206 495 586
+%%Pages: 1
+%%DocumentData: Clean7Bit
+%%Orientation: Portrait
+%%EndComments
+
+%%BeginProlog
+% This is a standard prolog for Postscript generated by Tk's canvas
+% widget.
+/CurrentEncoding [
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
+/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash
+/zero/one/two/three/four/five/six/seven
+/eight/nine/colon/semicolon/less/equal/greater/question
+/at/A/B/C/D/E/F/G
+/H/I/J/K/L/M/N/O
+/P/Q/R/S/T/U/V/W
+/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore
+/grave/a/b/c/d/e/f/g
+/h/i/j/k/l/m/n/o
+/p/q/r/s/t/u/v/w
+/x/y/z/braceleft/bar/braceright/asciitilde/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/exclamdown/cent/sterling/currency/yen/brokenbar/section
+/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron
+/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered
+/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown
+/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
+/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
+/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
+/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
+/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
+] def
+50 dict begin
+/baseline 0 def
+/stipimage 0 def
+/height 0 def
+/justify 0 def
+/lineLength 0 def
+/spacing 0 def
+/stipple 0 def
+/strings 0 def
+/xoffset 0 def
+/yoffset 0 def
+/tmpstip null def
+/baselineSampler ( TXygqPZ) def
+baselineSampler 0 196 put
+/cstringshow {{ dup type /stringtype eq { show } { glyphshow } ifelse } forall } bind def
+/cstringwidth {0 exch 0 exch { dup type /stringtype eq { stringwidth } { currentfont /Encoding get exch 1 exch put (\001) stringwidth } ifelse exch 3 1 roll add 3 1 roll add exch } forall } bind def
+/ISOEncode {dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding CurrentEncoding def currentdict end /Temporary exch definefont } bind def
+/StrokeClip {{strokepath} stopped { (This Postscript printer gets limitcheck overflows when) = (stippling dashed lines;  lines will be printed solid instead.) = [] 0 setdash strokepath} if clip } bind def
+/EvenPixels {dup 0 matrix currentmatrix dtransform dup mul exch dup mul add sqrt dup round dup 1 lt {pop 1} if exch div mul } bind def
+/StippleFill {/tmpstip 1 index def 1 EvenPixels dup scale pathbbox 4 2 roll 5 index div dup 0 lt {1 sub} if cvi 5 index mul 4 1 roll 6 index div dup 0 lt {1 sub} if cvi 6 index mul 3 2 roll 6 index exch { 2 index 5 index 3 index { gsave 1 index exch translate 5 index 5 index true matrix tmpstip imagemask grestore } for pop } for pop pop pop pop pop } bind def
+/AdjustColor {CL 2 lt { currentgray CL 0 eq { .5 lt {0} {1} ifelse } if setgray } if } bind def
+/DrawText {/stipple exch def /justify exch def /yoffset exch def /xoffset exch def /spacing exch def /strings exch def /lineLength 0 def strings { cstringwidth pop dup lineLength gt {/lineLength exch def} {pop} ifelse newpath } forall 0 0 moveto baselineSampler false charpath pathbbox dup /baseline exch def exch pop exch sub /height exch def pop newpath translate rotate lineLength xoffset mul strings length 1 sub spacing mul height add yoffset mul translate justify lineLength mul baseline neg translate strings { dup cstringwidth pop justify neg mul 0 moveto stipple { gsave /char (X) def { dup type /stringtype eq { { char 0 3 -1 roll put currentpoint gsave char true charpath clip StippleText grestore char stringwidth translate moveto } forall } { currentfont /Encoding get exch 1 exch put currentpoint gsave (\001) true charpath clip StippleText grestore (\001) stringwidth translate moveto } ifelse } forall grestore } {cstringshow} ifelse 0 spacing neg translate } forall } bind def
+/TkPhotoColor {gsave 32 dict begin /tinteger exch def /transparent 1 string def transparent 0 tinteger put /olddict exch def olddict /DataSource get dup type /filetype ne { olddict /DataSource 3 -1 roll 0 () /SubFileDecode filter put } { pop } ifelse /newdict olddict maxlength dict def olddict newdict copy pop /w newdict /Width get def /crpp newdict /Decode get length 2 idiv def /str w string def /pix w crpp mul string def /substrlen 2 w log 2 log div floor exp cvi def /substrs [ { substrlen string 0 1 substrlen 1 sub { 1 index exch tinteger put } for /substrlen substrlen 2 idiv def substrlen 0 eq {exit} if } loop ] def /h newdict /Height get def 1 w div 1 h div matrix scale olddict /ImageMatrix get exch matrix concatmatrix matrix invertmatrix concat newdict /Height 1 put newdict /DataSource pix put /mat [w 0 0 h 0 0] def newdict /ImageMatrix mat put 0 1 h 1 sub { mat 5 3 -1 roll neg put olddict /DataSource get str readstring pop pop /tail str def /x 0 def olddict /DataSource get pix readstring pop pop { tail transparent search dup /done exch not def {exch pop exch pop} if /w1 exch length def w1 0 ne { newdict /DataSource pix x crpp mul w1 crpp mul getinterval put newdict /Width w1 put mat 4 x neg put /x x w1 add def newdict image /tail tail w1 tail length w1 sub getinterval def } if done {exit} if tail substrs { anchorsearch {pop} if } forall /tail exch def tail length 0 eq {exit} if /x w tail length sub def } loop } for end grestore } bind def
+/TkPhotoMono {gsave 32 dict begin /dummyInteger exch def /olddict exch def olddict /DataSource get dup type /filetype ne { olddict /DataSource 3 -1 roll 0 () /SubFileDecode filter put } { pop } ifelse /newdict olddict maxlength dict def olddict newdict copy pop /w newdict /Width get def /pix w 7 add 8 idiv string def /h newdict /Height get def 1 w div 1 h div matrix scale olddict /ImageMatrix get exch matrix concatmatrix matrix invertmatrix concat newdict /Height 1 put newdict /DataSource pix put /mat [w 0 0 h 0 0] def newdict /ImageMatrix mat put 0 1 h 1 sub { mat 5 3 -1 roll neg put 0.000 0.000 0.000 setrgbcolor olddict /DataSource get pix readstring pop pop newdict /DataSource pix put newdict imagemask 1.000 1.000 1.000 setrgbcolor olddict /DataSource get pix readstring pop pop newdict /DataSource pix put newdict imagemask } for end grestore } bind def
+%%EndProlog
+%%BeginSetup
+/CL 2 def
+%%EndSetup
+
+%%Page: 1 1
+save
+306.0 396.0 translate
+0.75 0.75 scale
+2 -253 translate
+-253 506 moveto 249 506 lineto 249 0 lineto -253 0 lineto closepath clip newpath
+gsave
+grestore
+gsave
+grestore
+gsave
+-250 -249 moveto
+-250 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-200 -249 moveto
+-200 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-150 -249 moveto
+-150 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-100 -249 moveto
+-100 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-50 -249 moveto
+-50 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+0 -249 moveto
+0 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+50 -249 moveto
+50 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+100 -249 moveto
+100 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+150 -249 moveto
+150 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+200 -249 moveto
+200 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+250 -249 moveto
+250 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 1 moveto
+500 1 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 51 moveto
+500 51 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 101 moveto
+500 101 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 151 moveto
+500 151 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 201 moveto
+500 201 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 251 moveto
+500 251 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 301 moveto
+500 301 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 351 moveto
+500 351 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 401 moveto
+500 401 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 451 moveto
+500 451 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 501 moveto
+500 501 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+0 151 moveto
+3.06161699786838e-15 101 lineto
+-150 101 lineto
+-150 351 lineto
+1 setlinecap
+1 setlinejoin
+5 setlinewidth
+[] 0 setdash
+0.000 0.000 1.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-150 351 moveto
+99.9999999999999 351 lineto
+100 151 lineto
+-50 151 lineto
+-50 251 lineto
+-4.2632564145606e-14 251 lineto
+1 setlinecap
+1 setlinejoin
+5 setlinewidth
+[] 0 setdash
+1.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+grestore
+gsave
+16 151 moveto
+14 153 lineto
+10 152 lineto
+7 155 lineto
+9 158 lineto
+8 160 lineto
+5 157 lineto
+0.999999999999997 158 lineto
+-3 156 lineto
+-6 159 lineto
+-8 157 lineto
+-5 155 lineto
+-7 151 lineto
+-5 147 lineto
+-8 145 lineto
+-6 143 lineto
+-3 146 lineto
+1 144 lineto
+5 145 lineto
+8 142 lineto
+9 144 lineto
+7 147 lineto
+10 150 lineto
+14 149 lineto
+16 151 lineto
+0.000 0.000 0.000 setrgbcolor AdjustColor
+eofill
+16 151 moveto
+14 153 lineto
+10 152 lineto
+7 155 lineto
+9 158 lineto
+8 160 lineto
+5 157 lineto
+0.999999999999997 158 lineto
+-3 156 lineto
+-6 159 lineto
+-8 157 lineto
+-5 155 lineto
+-7 151 lineto
+-5 147 lineto
+-8 145 lineto
+-6 143 lineto
+-3 146 lineto
+1 144 lineto
+5 145 lineto
+8 142 lineto
+9 144 lineto
+7 147 lineto
+10 150 lineto
+14 149 lineto
+16 151 lineto
+1 setlinejoin 1 setlinecap
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+restore showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/Notebooks/imgs_chap5/img_exo_2spirales.py b/Notebooks/imgs_chap5/img_exo_2spirales.py
new file mode 100644
index 0000000000000000000000000000000000000000..4e0e7ba3c4532635479105b6daeacf2d75871842
--- /dev/null
+++ b/Notebooks/imgs_chap5/img_exo_2spirales.py
@@ -0,0 +1,52 @@
+from turtle import *
+
+speed(0)
+WIDTH, HEIGHT = 500, 500
+
+screen = Screen()
+screen.setup(WIDTH + 4, HEIGHT + 8)  # fudge factors due to window borders & title bar
+
+
+penup()
+for k in range(21):
+    goto(-500+k*50,-500)
+    pendown()
+    goto(-500+k*50,500)
+    penup()
+for k in range(20):
+    goto(-500,-500+k*50)
+    pendown()
+    goto(500,-500+k*50)
+    penup()
+
+goto(0, -100)
+pendown()
+width(5)
+
+
+color("blue")
+right(90)
+
+x = 50
+for _ in range(3):
+    forward(x)
+    right(90)
+    x = x + 100
+
+color("red")
+x = x - 100
+for _ in range(5):
+    forward(x)
+    right(90)
+    x = x - 50
+
+shape('turtle')
+color("black")
+left(90)
+penup()
+goto(0, -100)
+
+ts = getscreen()
+ts.getcanvas().postscript(file="img_exo_2spirales.png")
+
+done()
\ No newline at end of file
diff --git a/Notebooks/imgs_chap5/img_exo_carres.png b/Notebooks/imgs_chap5/img_exo_carres.png
new file mode 100644
index 0000000000000000000000000000000000000000..1e0fedbdfdc8edc27568fbb7a40e41c88a114824
--- /dev/null
+++ b/Notebooks/imgs_chap5/img_exo_carres.png
@@ -0,0 +1,372 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: Tk Canvas Widget
+%%For: mathieu
+%%Title: Window .!canvas
+%%CreationDate: Wed Jan 15 23:09:17 2025
+%%BoundingBox: 117 206 495 586
+%%Pages: 1
+%%DocumentData: Clean7Bit
+%%Orientation: Portrait
+%%EndComments
+
+%%BeginProlog
+% This is a standard prolog for Postscript generated by Tk's canvas
+% widget.
+/CurrentEncoding [
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
+/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash
+/zero/one/two/three/four/five/six/seven
+/eight/nine/colon/semicolon/less/equal/greater/question
+/at/A/B/C/D/E/F/G
+/H/I/J/K/L/M/N/O
+/P/Q/R/S/T/U/V/W
+/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore
+/grave/a/b/c/d/e/f/g
+/h/i/j/k/l/m/n/o
+/p/q/r/s/t/u/v/w
+/x/y/z/braceleft/bar/braceright/asciitilde/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/exclamdown/cent/sterling/currency/yen/brokenbar/section
+/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron
+/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered
+/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown
+/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
+/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
+/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
+/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
+/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
+] def
+50 dict begin
+/baseline 0 def
+/stipimage 0 def
+/height 0 def
+/justify 0 def
+/lineLength 0 def
+/spacing 0 def
+/stipple 0 def
+/strings 0 def
+/xoffset 0 def
+/yoffset 0 def
+/tmpstip null def
+/baselineSampler ( TXygqPZ) def
+baselineSampler 0 196 put
+/cstringshow {{ dup type /stringtype eq { show } { glyphshow } ifelse } forall } bind def
+/cstringwidth {0 exch 0 exch { dup type /stringtype eq { stringwidth } { currentfont /Encoding get exch 1 exch put (\001) stringwidth } ifelse exch 3 1 roll add 3 1 roll add exch } forall } bind def
+/ISOEncode {dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding CurrentEncoding def currentdict end /Temporary exch definefont } bind def
+/StrokeClip {{strokepath} stopped { (This Postscript printer gets limitcheck overflows when) = (stippling dashed lines;  lines will be printed solid instead.) = [] 0 setdash strokepath} if clip } bind def
+/EvenPixels {dup 0 matrix currentmatrix dtransform dup mul exch dup mul add sqrt dup round dup 1 lt {pop 1} if exch div mul } bind def
+/StippleFill {/tmpstip 1 index def 1 EvenPixels dup scale pathbbox 4 2 roll 5 index div dup 0 lt {1 sub} if cvi 5 index mul 4 1 roll 6 index div dup 0 lt {1 sub} if cvi 6 index mul 3 2 roll 6 index exch { 2 index 5 index 3 index { gsave 1 index exch translate 5 index 5 index true matrix tmpstip imagemask grestore } for pop } for pop pop pop pop pop } bind def
+/AdjustColor {CL 2 lt { currentgray CL 0 eq { .5 lt {0} {1} ifelse } if setgray } if } bind def
+/DrawText {/stipple exch def /justify exch def /yoffset exch def /xoffset exch def /spacing exch def /strings exch def /lineLength 0 def strings { cstringwidth pop dup lineLength gt {/lineLength exch def} {pop} ifelse newpath } forall 0 0 moveto baselineSampler false charpath pathbbox dup /baseline exch def exch pop exch sub /height exch def pop newpath translate rotate lineLength xoffset mul strings length 1 sub spacing mul height add yoffset mul translate justify lineLength mul baseline neg translate strings { dup cstringwidth pop justify neg mul 0 moveto stipple { gsave /char (X) def { dup type /stringtype eq { { char 0 3 -1 roll put currentpoint gsave char true charpath clip StippleText grestore char stringwidth translate moveto } forall } { currentfont /Encoding get exch 1 exch put currentpoint gsave (\001) true charpath clip StippleText grestore (\001) stringwidth translate moveto } ifelse } forall grestore } {cstringshow} ifelse 0 spacing neg translate } forall } bind def
+/TkPhotoColor {gsave 32 dict begin /tinteger exch def /transparent 1 string def transparent 0 tinteger put /olddict exch def olddict /DataSource get dup type /filetype ne { olddict /DataSource 3 -1 roll 0 () /SubFileDecode filter put } { pop } ifelse /newdict olddict maxlength dict def olddict newdict copy pop /w newdict /Width get def /crpp newdict /Decode get length 2 idiv def /str w string def /pix w crpp mul string def /substrlen 2 w log 2 log div floor exp cvi def /substrs [ { substrlen string 0 1 substrlen 1 sub { 1 index exch tinteger put } for /substrlen substrlen 2 idiv def substrlen 0 eq {exit} if } loop ] def /h newdict /Height get def 1 w div 1 h div matrix scale olddict /ImageMatrix get exch matrix concatmatrix matrix invertmatrix concat newdict /Height 1 put newdict /DataSource pix put /mat [w 0 0 h 0 0] def newdict /ImageMatrix mat put 0 1 h 1 sub { mat 5 3 -1 roll neg put olddict /DataSource get str readstring pop pop /tail str def /x 0 def olddict /DataSource get pix readstring pop pop { tail transparent search dup /done exch not def {exch pop exch pop} if /w1 exch length def w1 0 ne { newdict /DataSource pix x crpp mul w1 crpp mul getinterval put newdict /Width w1 put mat 4 x neg put /x x w1 add def newdict image /tail tail w1 tail length w1 sub getinterval def } if done {exit} if tail substrs { anchorsearch {pop} if } forall /tail exch def tail length 0 eq {exit} if /x w tail length sub def } loop } for end grestore } bind def
+/TkPhotoMono {gsave 32 dict begin /dummyInteger exch def /olddict exch def olddict /DataSource get dup type /filetype ne { olddict /DataSource 3 -1 roll 0 () /SubFileDecode filter put } { pop } ifelse /newdict olddict maxlength dict def olddict newdict copy pop /w newdict /Width get def /pix w 7 add 8 idiv string def /h newdict /Height get def 1 w div 1 h div matrix scale olddict /ImageMatrix get exch matrix concatmatrix matrix invertmatrix concat newdict /Height 1 put newdict /DataSource pix put /mat [w 0 0 h 0 0] def newdict /ImageMatrix mat put 0 1 h 1 sub { mat 5 3 -1 roll neg put 0.000 0.000 0.000 setrgbcolor olddict /DataSource get pix readstring pop pop newdict /DataSource pix put newdict imagemask 1.000 1.000 1.000 setrgbcolor olddict /DataSource get pix readstring pop pop newdict /DataSource pix put newdict imagemask } for end grestore } bind def
+%%EndProlog
+%%BeginSetup
+/CL 2 def
+%%EndSetup
+
+%%Page: 1 1
+save
+306.0 396.0 translate
+0.75 0.75 scale
+2 -253 translate
+-253 506 moveto 249 506 lineto 249 0 lineto -253 0 lineto closepath clip newpath
+gsave
+grestore
+gsave
+grestore
+gsave
+-250 -249 moveto
+-250 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-200 -249 moveto
+-200 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-150 -249 moveto
+-150 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-100 -249 moveto
+-100 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-50 -249 moveto
+-50 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+0 -249 moveto
+0 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+50 -249 moveto
+50 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+100 -249 moveto
+100 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+150 -249 moveto
+150 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+200 -249 moveto
+200 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+250 -249 moveto
+250 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 1 moveto
+500 1 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 51 moveto
+500 51 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 101 moveto
+500 101 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 151 moveto
+500 151 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 201 moveto
+500 201 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 251 moveto
+500 251 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 301 moveto
+500 301 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 351 moveto
+500 351 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 401 moveto
+500 401 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 451 moveto
+500 451 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 501 moveto
+500 501 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-200 51 moveto
+-150 51 lineto
+-150 101 lineto
+-200 101 lineto
+-200 51 lineto
+-100 51 lineto
+-100 151 lineto
+-200 151 lineto
+-200 51 lineto
+-50 50.9999999999999 lineto
+-49.9999999999999 201 lineto
+-200 201 lineto
+-200 51 lineto
+-5.6843418860808e-14 50.9999999999999 lineto
+1.02360665028348e-13 251 lineto
+-200 251 lineto
+-200 51 lineto
+49.9999999999999 50.9999999999998 lineto
+50.0000000000002 301 lineto
+-200 301 lineto
+-200 51.0000000000001 lineto
+99.9999999999999 50.9999999999997 lineto
+100 351 lineto
+-200 351 lineto
+-200 51.0000000000001 lineto
+150 50.9999999999996 lineto
+150 401 lineto
+-200 401 lineto
+-200 51.0000000000001 lineto
+200 50.9999999999995 lineto
+200.000000000001 450.999999999999 lineto
+-199.999999999999 451 lineto
+-200 51.0000000000002 lineto
+1 setlinecap
+1 setlinejoin
+5 setlinewidth
+[] 0 setdash
+1.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-200 51.0000000000002 moveto
+-209 56.0000000000002 lineto
+-207 51.0000000000002 lineto
+-209 46.0000000000002 lineto
+-200 51.0000000000002 lineto
+1.000 0.000 0.000 setrgbcolor AdjustColor
+eofill
+-200 51.0000000000002 moveto
+-209 56.0000000000002 lineto
+-207 51.0000000000002 lineto
+-209 46.0000000000002 lineto
+-200 51.0000000000002 lineto
+1 setlinejoin 1 setlinecap
+1 setlinewidth
+[] 0 setdash
+1.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+restore showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/Notebooks/imgs_chap5/img_exo_carres.py b/Notebooks/imgs_chap5/img_exo_carres.py
new file mode 100644
index 0000000000000000000000000000000000000000..0502b5cfe1926830885eb6387caab7475aabad76
--- /dev/null
+++ b/Notebooks/imgs_chap5/img_exo_carres.py
@@ -0,0 +1,44 @@
+from turtle import *
+
+speed(0)
+WIDTH, HEIGHT = 500, 500
+
+screen = Screen()
+screen.setup(WIDTH + 4, HEIGHT + 8)  # fudge factors due to window borders & title bar
+
+
+penup()
+for k in range(21):
+    goto(-500+k*50,-500)
+    pendown()
+    goto(-500+k*50,500)
+    penup()
+for k in range(20):
+    goto(-500,-500+k*50)
+    pendown()
+    goto(500,-500+k*50)
+    penup()
+
+# pour positionner le curseur en bas à gauche
+penup()
+goto(-200, -200)
+pendown()
+
+# mettre le bon style de trait
+width(5)
+color("red")
+
+def carre(longueur):
+    for _ in range(4):
+        forward(longueur)
+        left(90)
+# à compléter avec maximum 5 lignes
+x = 50
+for _ in range(8):
+    carre(x)
+    x = 50 + x
+
+ts = getscreen()
+ts.getcanvas().postscript(file="img_exo_carres.png")
+
+done()
\ No newline at end of file
diff --git a/Notebooks/imgs_chap5/img_exo_spirale.png b/Notebooks/imgs_chap5/img_exo_spirale.png
new file mode 100644
index 0000000000000000000000000000000000000000..a7e2a622fd0ebcfed79f958abd77eae1cfae515e
--- /dev/null
+++ b/Notebooks/imgs_chap5/img_exo_spirale.png
@@ -0,0 +1,390 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: Tk Canvas Widget
+%%For: mathieu
+%%Title: Window .!canvas
+%%CreationDate: Wed Jan 15 22:14:23 2025
+%%BoundingBox: 117 206 495 586
+%%Pages: 1
+%%DocumentData: Clean7Bit
+%%Orientation: Portrait
+%%EndComments
+
+%%BeginProlog
+% This is a standard prolog for Postscript generated by Tk's canvas
+% widget.
+/CurrentEncoding [
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
+/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash
+/zero/one/two/three/four/five/six/seven
+/eight/nine/colon/semicolon/less/equal/greater/question
+/at/A/B/C/D/E/F/G
+/H/I/J/K/L/M/N/O
+/P/Q/R/S/T/U/V/W
+/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore
+/grave/a/b/c/d/e/f/g
+/h/i/j/k/l/m/n/o
+/p/q/r/s/t/u/v/w
+/x/y/z/braceleft/bar/braceright/asciitilde/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/exclamdown/cent/sterling/currency/yen/brokenbar/section
+/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron
+/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered
+/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown
+/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
+/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
+/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
+/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
+/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
+] def
+50 dict begin
+/baseline 0 def
+/stipimage 0 def
+/height 0 def
+/justify 0 def
+/lineLength 0 def
+/spacing 0 def
+/stipple 0 def
+/strings 0 def
+/xoffset 0 def
+/yoffset 0 def
+/tmpstip null def
+/baselineSampler ( TXygqPZ) def
+baselineSampler 0 196 put
+/cstringshow {{ dup type /stringtype eq { show } { glyphshow } ifelse } forall } bind def
+/cstringwidth {0 exch 0 exch { dup type /stringtype eq { stringwidth } { currentfont /Encoding get exch 1 exch put (\001) stringwidth } ifelse exch 3 1 roll add 3 1 roll add exch } forall } bind def
+/ISOEncode {dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding CurrentEncoding def currentdict end /Temporary exch definefont } bind def
+/StrokeClip {{strokepath} stopped { (This Postscript printer gets limitcheck overflows when) = (stippling dashed lines;  lines will be printed solid instead.) = [] 0 setdash strokepath} if clip } bind def
+/EvenPixels {dup 0 matrix currentmatrix dtransform dup mul exch dup mul add sqrt dup round dup 1 lt {pop 1} if exch div mul } bind def
+/StippleFill {/tmpstip 1 index def 1 EvenPixels dup scale pathbbox 4 2 roll 5 index div dup 0 lt {1 sub} if cvi 5 index mul 4 1 roll 6 index div dup 0 lt {1 sub} if cvi 6 index mul 3 2 roll 6 index exch { 2 index 5 index 3 index { gsave 1 index exch translate 5 index 5 index true matrix tmpstip imagemask grestore } for pop } for pop pop pop pop pop } bind def
+/AdjustColor {CL 2 lt { currentgray CL 0 eq { .5 lt {0} {1} ifelse } if setgray } if } bind def
+/DrawText {/stipple exch def /justify exch def /yoffset exch def /xoffset exch def /spacing exch def /strings exch def /lineLength 0 def strings { cstringwidth pop dup lineLength gt {/lineLength exch def} {pop} ifelse newpath } forall 0 0 moveto baselineSampler false charpath pathbbox dup /baseline exch def exch pop exch sub /height exch def pop newpath translate rotate lineLength xoffset mul strings length 1 sub spacing mul height add yoffset mul translate justify lineLength mul baseline neg translate strings { dup cstringwidth pop justify neg mul 0 moveto stipple { gsave /char (X) def { dup type /stringtype eq { { char 0 3 -1 roll put currentpoint gsave char true charpath clip StippleText grestore char stringwidth translate moveto } forall } { currentfont /Encoding get exch 1 exch put currentpoint gsave (\001) true charpath clip StippleText grestore (\001) stringwidth translate moveto } ifelse } forall grestore } {cstringshow} ifelse 0 spacing neg translate } forall } bind def
+/TkPhotoColor {gsave 32 dict begin /tinteger exch def /transparent 1 string def transparent 0 tinteger put /olddict exch def olddict /DataSource get dup type /filetype ne { olddict /DataSource 3 -1 roll 0 () /SubFileDecode filter put } { pop } ifelse /newdict olddict maxlength dict def olddict newdict copy pop /w newdict /Width get def /crpp newdict /Decode get length 2 idiv def /str w string def /pix w crpp mul string def /substrlen 2 w log 2 log div floor exp cvi def /substrs [ { substrlen string 0 1 substrlen 1 sub { 1 index exch tinteger put } for /substrlen substrlen 2 idiv def substrlen 0 eq {exit} if } loop ] def /h newdict /Height get def 1 w div 1 h div matrix scale olddict /ImageMatrix get exch matrix concatmatrix matrix invertmatrix concat newdict /Height 1 put newdict /DataSource pix put /mat [w 0 0 h 0 0] def newdict /ImageMatrix mat put 0 1 h 1 sub { mat 5 3 -1 roll neg put olddict /DataSource get str readstring pop pop /tail str def /x 0 def olddict /DataSource get pix readstring pop pop { tail transparent search dup /done exch not def {exch pop exch pop} if /w1 exch length def w1 0 ne { newdict /DataSource pix x crpp mul w1 crpp mul getinterval put newdict /Width w1 put mat 4 x neg put /x x w1 add def newdict image /tail tail w1 tail length w1 sub getinterval def } if done {exit} if tail substrs { anchorsearch {pop} if } forall /tail exch def tail length 0 eq {exit} if /x w tail length sub def } loop } for end grestore } bind def
+/TkPhotoMono {gsave 32 dict begin /dummyInteger exch def /olddict exch def olddict /DataSource get dup type /filetype ne { olddict /DataSource 3 -1 roll 0 () /SubFileDecode filter put } { pop } ifelse /newdict olddict maxlength dict def olddict newdict copy pop /w newdict /Width get def /pix w 7 add 8 idiv string def /h newdict /Height get def 1 w div 1 h div matrix scale olddict /ImageMatrix get exch matrix concatmatrix matrix invertmatrix concat newdict /Height 1 put newdict /DataSource pix put /mat [w 0 0 h 0 0] def newdict /ImageMatrix mat put 0 1 h 1 sub { mat 5 3 -1 roll neg put 0.000 0.000 0.000 setrgbcolor olddict /DataSource get pix readstring pop pop newdict /DataSource pix put newdict imagemask 1.000 1.000 1.000 setrgbcolor olddict /DataSource get pix readstring pop pop newdict /DataSource pix put newdict imagemask } for end grestore } bind def
+%%EndProlog
+%%BeginSetup
+/CL 2 def
+%%EndSetup
+
+%%Page: 1 1
+save
+306.0 396.0 translate
+0.75 0.75 scale
+2 -253 translate
+-253 506 moveto 249 506 lineto 249 0 lineto -253 0 lineto closepath clip newpath
+gsave
+grestore
+gsave
+grestore
+gsave
+-250 -249 moveto
+-250 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-200 -249 moveto
+-200 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-150 -249 moveto
+-150 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-100 -249 moveto
+-100 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-50 -249 moveto
+-50 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+0 -249 moveto
+0 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+50 -249 moveto
+50 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+100 -249 moveto
+100 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+150 -249 moveto
+150 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+200 -249 moveto
+200 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+250 -249 moveto
+250 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 1 moveto
+500 1 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 51 moveto
+500 51 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 101 moveto
+500 101 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 151 moveto
+500 151 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 201 moveto
+500 201 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 251 moveto
+500 251 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 301 moveto
+500 301 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 351 moveto
+500 351 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 401 moveto
+500 401 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 451 moveto
+500 451 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 501 moveto
+500 501 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-200 51 moveto
+200 51 lineto
+200 401 lineto
+-100 401 lineto
+-100 151 lineto
+100 151 lineto
+100 301 lineto
+2.8421709430404e-14 301 lineto
+6.99039044532532e-15 251 lineto
+1 setlinecap
+1 setlinejoin
+5 setlinewidth
+[] 0 setdash
+1.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+grestore
+gsave
+-184 51 moveto
+-186 53 lineto
+-190 52 lineto
+-193 55 lineto
+-191 58 lineto
+-192 60 lineto
+-195 57 lineto
+-199 58 lineto
+-203 56 lineto
+-206 59 lineto
+-208 57 lineto
+-205 55 lineto
+-207 51 lineto
+-205 47 lineto
+-208 45 lineto
+-206 43 lineto
+-203 46 lineto
+-199 44 lineto
+-195 45 lineto
+-192 42 lineto
+-191 44 lineto
+-193 47 lineto
+-190 50 lineto
+-186 49 lineto
+-184 51 lineto
+1.000 0.000 0.000 setrgbcolor AdjustColor
+eofill
+-184 51 moveto
+-186 53 lineto
+-190 52 lineto
+-193 55 lineto
+-191 58 lineto
+-192 60 lineto
+-195 57 lineto
+-199 58 lineto
+-203 56 lineto
+-206 59 lineto
+-208 57 lineto
+-205 55 lineto
+-207 51 lineto
+-205 47 lineto
+-208 45 lineto
+-206 43 lineto
+-203 46 lineto
+-199 44 lineto
+-195 45 lineto
+-192 42 lineto
+-191 44 lineto
+-193 47 lineto
+-190 50 lineto
+-186 49 lineto
+-184 51 lineto
+1 setlinejoin 1 setlinecap
+1 setlinewidth
+[] 0 setdash
+1.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+restore showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/Notebooks/imgs_chap5/img_exo_spirale.py b/Notebooks/imgs_chap5/img_exo_spirale.py
new file mode 100644
index 0000000000000000000000000000000000000000..04c92903377f5ce6fa04b68b8db231d26c9fae24
--- /dev/null
+++ b/Notebooks/imgs_chap5/img_exo_spirale.py
@@ -0,0 +1,41 @@
+from turtle import *
+
+speed(0)
+WIDTH, HEIGHT = 500, 500
+
+screen = Screen()
+screen.setup(WIDTH + 4, HEIGHT + 8)  # fudge factors due to window borders & title bar
+
+
+penup()
+for k in range(21):
+    goto(-500+k*50,-500)
+    pendown()
+    goto(-500+k*50,500)
+    penup()
+for k in range(20):
+    goto(-500,-500+k*50)
+    pendown()
+    goto(500,-500+k*50)
+    penup()
+
+goto(-200, -200)
+pendown()
+width(5)
+
+color("red")
+
+x = 400
+for _ in range(8):
+    forward(x)
+    left(90)
+    x = x - 50
+
+shape('turtle')
+penup()
+goto(-200, -200)
+
+ts = getscreen()
+ts.getcanvas().postscript(file="img_exo_spirale.png")
+
+done()
\ No newline at end of file
diff --git a/Notebooks/imgs_chap5/img_exo_triangles.png b/Notebooks/imgs_chap5/img_exo_triangles.png
new file mode 100644
index 0000000000000000000000000000000000000000..8b94342e4b83598e74b6ad61576ae4322a95b4e8
--- /dev/null
+++ b/Notebooks/imgs_chap5/img_exo_triangles.png
@@ -0,0 +1,558 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: Tk Canvas Widget
+%%For: mathieu
+%%Title: Window .!canvas
+%%CreationDate: Wed Jan 15 23:19:34 2025
+%%BoundingBox: 117 206 495 586
+%%Pages: 1
+%%DocumentData: Clean7Bit
+%%Orientation: Portrait
+%%EndComments
+
+%%BeginProlog
+% This is a standard prolog for Postscript generated by Tk's canvas
+% widget.
+/CurrentEncoding [
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
+/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash
+/zero/one/two/three/four/five/six/seven
+/eight/nine/colon/semicolon/less/equal/greater/question
+/at/A/B/C/D/E/F/G
+/H/I/J/K/L/M/N/O
+/P/Q/R/S/T/U/V/W
+/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore
+/grave/a/b/c/d/e/f/g
+/h/i/j/k/l/m/n/o
+/p/q/r/s/t/u/v/w
+/x/y/z/braceleft/bar/braceright/asciitilde/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/space/space/space/space/space/space/space
+/space/exclamdown/cent/sterling/currency/yen/brokenbar/section
+/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron
+/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered
+/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown
+/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
+/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
+/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
+/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
+/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
+] def
+50 dict begin
+/baseline 0 def
+/stipimage 0 def
+/height 0 def
+/justify 0 def
+/lineLength 0 def
+/spacing 0 def
+/stipple 0 def
+/strings 0 def
+/xoffset 0 def
+/yoffset 0 def
+/tmpstip null def
+/baselineSampler ( TXygqPZ) def
+baselineSampler 0 196 put
+/cstringshow {{ dup type /stringtype eq { show } { glyphshow } ifelse } forall } bind def
+/cstringwidth {0 exch 0 exch { dup type /stringtype eq { stringwidth } { currentfont /Encoding get exch 1 exch put (\001) stringwidth } ifelse exch 3 1 roll add 3 1 roll add exch } forall } bind def
+/ISOEncode {dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding CurrentEncoding def currentdict end /Temporary exch definefont } bind def
+/StrokeClip {{strokepath} stopped { (This Postscript printer gets limitcheck overflows when) = (stippling dashed lines;  lines will be printed solid instead.) = [] 0 setdash strokepath} if clip } bind def
+/EvenPixels {dup 0 matrix currentmatrix dtransform dup mul exch dup mul add sqrt dup round dup 1 lt {pop 1} if exch div mul } bind def
+/StippleFill {/tmpstip 1 index def 1 EvenPixels dup scale pathbbox 4 2 roll 5 index div dup 0 lt {1 sub} if cvi 5 index mul 4 1 roll 6 index div dup 0 lt {1 sub} if cvi 6 index mul 3 2 roll 6 index exch { 2 index 5 index 3 index { gsave 1 index exch translate 5 index 5 index true matrix tmpstip imagemask grestore } for pop } for pop pop pop pop pop } bind def
+/AdjustColor {CL 2 lt { currentgray CL 0 eq { .5 lt {0} {1} ifelse } if setgray } if } bind def
+/DrawText {/stipple exch def /justify exch def /yoffset exch def /xoffset exch def /spacing exch def /strings exch def /lineLength 0 def strings { cstringwidth pop dup lineLength gt {/lineLength exch def} {pop} ifelse newpath } forall 0 0 moveto baselineSampler false charpath pathbbox dup /baseline exch def exch pop exch sub /height exch def pop newpath translate rotate lineLength xoffset mul strings length 1 sub spacing mul height add yoffset mul translate justify lineLength mul baseline neg translate strings { dup cstringwidth pop justify neg mul 0 moveto stipple { gsave /char (X) def { dup type /stringtype eq { { char 0 3 -1 roll put currentpoint gsave char true charpath clip StippleText grestore char stringwidth translate moveto } forall } { currentfont /Encoding get exch 1 exch put currentpoint gsave (\001) true charpath clip StippleText grestore (\001) stringwidth translate moveto } ifelse } forall grestore } {cstringshow} ifelse 0 spacing neg translate } forall } bind def
+/TkPhotoColor {gsave 32 dict begin /tinteger exch def /transparent 1 string def transparent 0 tinteger put /olddict exch def olddict /DataSource get dup type /filetype ne { olddict /DataSource 3 -1 roll 0 () /SubFileDecode filter put } { pop } ifelse /newdict olddict maxlength dict def olddict newdict copy pop /w newdict /Width get def /crpp newdict /Decode get length 2 idiv def /str w string def /pix w crpp mul string def /substrlen 2 w log 2 log div floor exp cvi def /substrs [ { substrlen string 0 1 substrlen 1 sub { 1 index exch tinteger put } for /substrlen substrlen 2 idiv def substrlen 0 eq {exit} if } loop ] def /h newdict /Height get def 1 w div 1 h div matrix scale olddict /ImageMatrix get exch matrix concatmatrix matrix invertmatrix concat newdict /Height 1 put newdict /DataSource pix put /mat [w 0 0 h 0 0] def newdict /ImageMatrix mat put 0 1 h 1 sub { mat 5 3 -1 roll neg put olddict /DataSource get str readstring pop pop /tail str def /x 0 def olddict /DataSource get pix readstring pop pop { tail transparent search dup /done exch not def {exch pop exch pop} if /w1 exch length def w1 0 ne { newdict /DataSource pix x crpp mul w1 crpp mul getinterval put newdict /Width w1 put mat 4 x neg put /x x w1 add def newdict image /tail tail w1 tail length w1 sub getinterval def } if done {exit} if tail substrs { anchorsearch {pop} if } forall /tail exch def tail length 0 eq {exit} if /x w tail length sub def } loop } for end grestore } bind def
+/TkPhotoMono {gsave 32 dict begin /dummyInteger exch def /olddict exch def olddict /DataSource get dup type /filetype ne { olddict /DataSource 3 -1 roll 0 () /SubFileDecode filter put } { pop } ifelse /newdict olddict maxlength dict def olddict newdict copy pop /w newdict /Width get def /pix w 7 add 8 idiv string def /h newdict /Height get def 1 w div 1 h div matrix scale olddict /ImageMatrix get exch matrix concatmatrix matrix invertmatrix concat newdict /Height 1 put newdict /DataSource pix put /mat [w 0 0 h 0 0] def newdict /ImageMatrix mat put 0 1 h 1 sub { mat 5 3 -1 roll neg put 0.000 0.000 0.000 setrgbcolor olddict /DataSource get pix readstring pop pop newdict /DataSource pix put newdict imagemask 1.000 1.000 1.000 setrgbcolor olddict /DataSource get pix readstring pop pop newdict /DataSource pix put newdict imagemask } for end grestore } bind def
+%%EndProlog
+%%BeginSetup
+/CL 2 def
+%%EndSetup
+
+%%Page: 1 1
+save
+306.0 396.0 translate
+0.75 0.75 scale
+2 -253 translate
+-253 506 moveto 249 506 lineto 249 0 lineto -253 0 lineto closepath clip newpath
+gsave
+grestore
+gsave
+grestore
+gsave
+-250 -249 moveto
+-250 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-225 -249 moveto
+-225 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-200 -249 moveto
+-200 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-175 -249 moveto
+-175 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-150 -249 moveto
+-150 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-125 -249 moveto
+-125 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-100 -249 moveto
+-100 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-75 -249 moveto
+-75 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-50 -249 moveto
+-50 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-25 -249 moveto
+-25 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+0 -249 moveto
+0 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+25 -249 moveto
+25 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+50 -249 moveto
+50 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+75 -249 moveto
+75 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+100 -249 moveto
+100 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+125 -249 moveto
+125 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+150 -249 moveto
+150 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+175 -249 moveto
+175 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+200 -249 moveto
+200 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+225 -249 moveto
+225 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+250 -249 moveto
+250 751 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 1 moveto
+500 1 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 26 moveto
+500 26 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 51 moveto
+500 51 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 76 moveto
+500 76 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 101 moveto
+500 101 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 126 moveto
+500 126 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 151 moveto
+500 151 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 176 moveto
+500 176 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 201 moveto
+500 201 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 226 moveto
+500 226 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 251 moveto
+500 251 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 276 moveto
+500 276 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 301 moveto
+500 301 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 326 moveto
+500 326 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 351 moveto
+500 351 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 376 moveto
+500 376 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 401 moveto
+500 401 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 426 moveto
+500 426 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 451 moveto
+500 451 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 476 moveto
+500 476 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-500 501 moveto
+500 501 lineto
+1 setlinecap
+1 setlinejoin
+1 setlinewidth
+[] 0 setdash
+0.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+0 251 moveto
+200 251 lineto
+100 424.205080756888 lineto
+-2.8421709430404e-14 251 lineto
+87.5000000000001 402.554445662277 lineto
+-87.4999999999999 402.554445662277 lineto
+-1.13686837721616e-13 251 lineto
+-74.9999999999999 380.903810567666 lineto
+-150 251 lineto
+-1.13686837721616e-13 251 lineto
+-125 251 lineto
+-62.5000000000004 142.746824526945 lineto
+-9.2370555648813e-14 251 lineto
+-50.0000000000003 164.397459621556 lineto
+49.9999999999996 164.397459621556 lineto
+-6.3948846218409e-14 251 lineto
+37.4999999999997 186.048094716167 lineto
+74.9999999999999 251 lineto
+-4.2632564145606e-14 251 lineto
+1 setlinecap
+1 setlinejoin
+3 setlinewidth
+[] 0 setdash
+1.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+gsave
+-4.2632564145606e-14 251 moveto
+-9.00000000000002 256 lineto
+-7.00000000000004 251 lineto
+-9.00000000000007 246 lineto
+-4.2632564145606e-14 251 lineto
+1.000 0.000 0.000 setrgbcolor AdjustColor
+eofill
+-4.2632564145606e-14 251 moveto
+-9.00000000000002 256 lineto
+-7.00000000000004 251 lineto
+-9.00000000000007 246 lineto
+-4.2632564145606e-14 251 lineto
+1 setlinejoin 1 setlinecap
+1 setlinewidth
+[] 0 setdash
+1.000 0.000 0.000 setrgbcolor AdjustColor
+stroke
+grestore
+restore showpage
+
+%%Trailer
+end
+%%EOF
diff --git a/Notebooks/imgs_chap5/img_exo_triangles.py b/Notebooks/imgs_chap5/img_exo_triangles.py
new file mode 100644
index 0000000000000000000000000000000000000000..99e8f218ebf55cb0ce2b756ef56f0ca64f5c4820
--- /dev/null
+++ b/Notebooks/imgs_chap5/img_exo_triangles.py
@@ -0,0 +1,46 @@
+from turtle import *
+
+speed(0)
+WIDTH, HEIGHT = 500, 500
+L_carre = 25
+
+screen = Screen()
+screen.setup(WIDTH + 4, HEIGHT + 8)  # fudge factors due to window borders & title bar
+
+
+penup()
+for k in range(2*WIDTH//L_carre + 1):
+    goto(-WIDTH+k*L_carre,-HEIGHT)
+    pendown()
+    goto(-WIDTH+k*L_carre,HEIGHT)
+    penup()
+for k in range(2*HEIGHT//L_carre):
+    goto(-WIDTH,-HEIGHT+k*L_carre)
+    pendown()
+    goto(WIDTH,-HEIGHT+k*L_carre)
+    penup()
+
+# pour positionner le curseur en bas à gauche
+penup()
+goto(0, 0)
+pendown()
+
+# mettre le bon style de trait
+width(3)
+color("red")
+
+def triangle(longueur):
+    for _ in range(3):
+        forward(longueur)
+        left(120)
+# à compléter avec maximum 5 lignes
+x = 200
+for _ in range(6):
+    triangle(x)
+    left(60)
+    x = x - 25
+
+ts = getscreen()
+ts.getcanvas().postscript(file="img_exo_triangles.png")
+
+done()
\ No newline at end of file