diff --git a/Notebooks/01_Premier_programme.ipynb b/Notebooks/01_Premier_programme.ipynb index 6a65cfb28bc147b3550dbf487b68c5346524cf46..9a60c21920eec3a7e28b0d6707227be8c4ed85e0 100644 --- a/Notebooks/01_Premier_programme.ipynb +++ b/Notebooks/01_Premier_programme.ipynb @@ -1,281 +1,281 @@ { "cells": [ { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-danger\"> \n \nAttention: **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\nPour reprendre votre travail, il suffit d'ouvrir le fichier .ipynb en cliquant sur *Fichier ouvrir*\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "# 1. Premier programme, premières instructions" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "Dans ce chapitre, nous explorons ce que c’est un programme et nous prenons l’exemple du dessin. Ici, un programme est une séquence d’instructions pour dessiner une image.\n\nAllons de l’avant (forward) avec la programmation. Nous allons voir que :\n\n- l’expression `from turtle import *` met à disposition les fonctions de dessin,\n\n- les instructions `forward()`, `backward()` permettent de tracer une ligne,\n\n- les instructions `left()`, `right()` permettent de changer de direction.\n\n- l'instruction `done()` permet de finaliser. Elle lance le tracage de la figure.\n\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 1.1 Le module `turtle`\n\nDans le langage de programmation Python, le module `turtle` (signifiant tortue en anglais) présente une façon sympathique pour faire des dessins. C’est pour cela que nous commençons notre aventure de programmation avec cet animal qui avance tout doucement à son propre rythme.\n\nOn s’imagine une tortue qui se déplace sur un canevas et laisse une trace.\n\nCi-dessous, vous trouvez notre premier programme de trois lignes :\n\n- dans la première ligne, nous importons toutes (`*`) les fonctions du module turtle,\n\n- avec `shape('turtle')`, nous affichons une tortue (au lieu de la flèche),\n\n- avec `forward(150)`, nous faisons avancer la tortue de 150 pixels,\n\n- avec `done()`, nous lançons de tracage de la figure." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 1\n\nAjoutez d’autres instructions telles que `backward()`, `left()` et `right()` pour faire un dessin." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class=\"alert alert-block alert-info\"><b>A savoir:</b> Cliquez sur le bouton <b>Excécuter</b> pour tester le programme. </div>" }, { - "metadata": { - "trusted": false, - "scrolled": true - }, "cell_type": "code", - "source": "from turtle import *\n\nshape('turtle')\nforward(150)\n\ndone()", "execution_count": null, - "outputs": [] + "metadata": { + "scrolled": true, + "trusted": false + }, + "outputs": [], + "source": "from turtle import *\n\nshape('turtle')\nforward(150)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### A retenir\nLa tortue peut se déplacer et dessiner une trace avec les 4 fonctions:\n\n- `forward(d)` pour avancer d'une distance `d` (en pixels)\n- `backward(d)` pour reculer\n- `left(a)` pour tourner à gauche d'un angle `a` (en degrés)\n- `right(a)` pour tourner à droite" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "***\n## 1.2 Le canevas\n\nAu départ, la tortue se trouve au centre d'une zone rectangulaire appelée _canevas_. Ce rectangle a les propriétés suivantes :\n\n- l'origine (0, 0) se trouve au centre,\n- l'axe horizontal x, s'étend de -300 à +300 (à droite),\n- l'axe vertical y, s'étend de -200 à +200 (en haut).\n\n\n\n### Exercice 2\nCompléter le programme ci-dessous pour mener la tortue tout en bas du canevas. Ensuite, ajoutez une diagonale." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nshape('turtle')\nforward(300)\nbackward(600)\nforward(300)\n\nleft(90)\nforward(200)\n\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nshape('turtle')\nforward(300)\nbackward(600)\nforward(300)\n\nleft(90)\nforward(200)\n\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "***\n## 1.3 Une séquence\n\nUn programme est une séquence d'instructions. Le bloc de 8 instructions ci-dessous indique comment dessiner un carré. La tortue doit avancer, tourner, avancer, tourner, etc.\n\n### Exercise 3\nModifiez ce code pour en faire un rectangle, au lieu d'un carré." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\n\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\n\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "***\n\n## 1.4 Épaisseur de ligne\n\nLa fonction `width(d)` (épaisseur en anglais) permet de définir l'épaisseur de la ligne.\nVoici un triangle où chaque côté a une épaisseur différente.\n\n### Exercise 4\nExplorez différentes épaisseurs de ligne." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(200)\nleft(120)\n\nwidth(5)\nforward(200)\nleft(120)\n\nwidth(10)\nforward(200)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(200)\nleft(120)\n\nwidth(5)\nforward(200)\nleft(120)\n\nwidth(10)\nforward(200)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "***\n\n## 1.5 Maison avec toit\n\nNous dessinons une maison et marquons le toit par une ligne plus épaisse.\n\n### Exercise 5\nDoublez l'épaisseur du toit. Ensuite, doublez la hauteur de la maison." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(100)\nleft(90)\nforward(60)\nleft(45)\nwidth(5)\nforward(71)\nleft(90)\nforward(71)\nwidth(1)\nleft(45)\nforward(60)\nleft(90)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(100)\nleft(90)\nforward(60)\nleft(45)\nwidth(5)\nforward(71)\nleft(90)\nforward(71)\nwidth(1)\nleft(45)\nforward(60)\nleft(90)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "***\n\n## 1.6 Raquette de ping-pong\n\nL'épaisseur de ligne est très utile dans le dessin.\n\n## Exercise 6\nTransformez la raquette de ping-pong en haltères de musculation." }, { + "cell_type": "code", + "execution_count": 3, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nwidth(20)\nforward(100)\nwidth(80)\nforward(20)\n\ndone()", - "execution_count": 3, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nwidth(20)\nforward(100)\nwidth(80)\nforward(20)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 1.7 Lunettes de soleil\n\nVoici encore un exemple où, avec un simple changement d'épaisseur, vous obtenez un effet très intéressant.\n\n### Exercise 7\nAjoutez la première branche qui manque." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nwidth(50)\nforward(20)\nwidth(10)\nforward(60)\nwidth(50)\nforward(20)\nwidth(10)\nforward(40)\nleft(45)\nforward(60)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nwidth(50)\nforward(20)\nwidth(10)\nforward(60)\nwidth(50)\nforward(20)\nwidth(10)\nforward(40)\nleft(45)\nforward(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 1.8 Commentaire\n\nLe symbole `#` indique un commentaire. Sur PC vous pouvez l'insérer avec **Alt Gr+3** ou **opt+3** sur Mac.\nUn commentaire permet d'ajouter une explication pour le lecteur humain. Il n'a aucune influence sur le programme. Python ignore tout simplement tout commentaire.\n\n## Exercise 8\nExpliquez dans chaque ligne ce que fait l'instruction." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class=\"alert alert-block alert-info\"><b>Astuce :</b> Utiliser les raccourcis <b>Ctrl + c</b> pour copier du texte et <b>Ctrl + v</b> pour coller le texte copié. </div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nwidth(50) # mettre l'épaisseur du trait à 50\nforward(20) # avancer de 20 pas\nwidth(10)\nforward(60)\nwidth(50)\nforward(20)\nwidth(10)\nforward(40)\nleft(45)\nforward(60)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nwidth(50) # mettre l'épaisseur du trait à 50\nforward(20) # avancer de 20 pas\nwidth(10)\nforward(60)\nwidth(50)\nforward(20)\nwidth(10)\nforward(40)\nleft(45)\nforward(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "L'exercice précédent servait à expliciter pour un débutant en programmation la signification des commandes écrites en anglais. Normalement on ne fait pas ça, car un programmeur est censé connaitre la signification des commandes.\n\nLes commentaires servent à expliciter la vraie signification d'une partie du programme.\n\n## Exercise 9\nExpliquez cette fois ce que dessine chaque partie du programme (verre, pont, verre, charnière, branche)." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\n# dessiner le premier verre\nwidth(50) \nforward(20)\n\n# dessiner le pont (nez)\nwidth(10) \nforward(60)\nwidth(50)\nforward(20)\nwidth(10)\nforward(40)\nleft(45)\nforward(60)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\n# dessiner le premier verre\nwidth(50) \nforward(20)\n\n# dessiner le pont (nez)\nwidth(10) \nforward(60)\nwidth(50)\nforward(20)\nwidth(10)\nforward(40)\nleft(45)\nforward(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 1.9 Équivalence\n\nLa tortue possède 4 fonctions de déplacement, mais à strictement parler, on pourrait s'en sortir avec seulement deux fonctions, `forward()` et `left()`, car :\n\n- `backward(d)` est équivalent à `forward(-d)`\n- `right(a)` est équivalent à `left(-a)`\n\nDans le programme ci-dessous, les 4 lignes du deuxième bloc sont équivalentes aux 4 instructions du premier bloc et donnent un résultat identique.\n\n### Exercice 10\nExpliquez avec un commentaire ce que font les 2 dernières instructions avant le `done()`.\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(160)\nleft(90)\nforward(100)\nleft(90)\n\nbackward(-160) # équivalent à forward(160)\nright(-90) # équivalent à left(90)\nbackward(-100)\nright(-90)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(160)\nleft(90)\nforward(100)\nleft(90)\n\nbackward(-160) # équivalent à forward(160)\nright(-90) # équivalent à left(90)\nbackward(-100)\nright(-90)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Exercices d'entraînement " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 11\nÉcrivez un programme qui dessine un losange conformément au croquis ci-dessous.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\n# à compléter...\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\n# à compléter...\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 12\nDessinez un hexagone régulier dont la longueur des côtés vaut 100 (voir la figure ci-dessous)." }, { + "cell_type": "markdown", "metadata": { "trusted": true }, - "cell_type": "markdown", "source": "<img src=\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiID8+CjxzdmcgYmFzZVByb2ZpbGU9ImZ1bGwiIGhlaWdodD0iMzAwcHgiIHZlcnNpb249IjEuMSIgd2lkdGg9IjMwMHB4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOmV2PSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL3htbC1ldmVudHMiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZGVmcyAvPjxwb2x5bGluZSBjbGlwLXBhdGg9InVybCgjYm9yZGVyX2NsaXApIiBmaWxsPSJub25lIiBwb2ludHM9IjEwMC41LDIwMC41IDIwMC41LDIwMC41IDI1MC41LDExMy44OTc0NTk2MjE1NTYxNCAyMDAuNTAwMDAwMDAwMDAwMDMsMjcuMjk0OTE5MjQzMTEyMjYgMTAwLjUwMDAwMDAwMDAwMDAzLDI3LjI5NDkxOTI0MzExMjIyIDUwLjUsMTEzLjg5NzQ1OTYyMTU1NjA1IDEwMC40OTk5OTk5OTk5OTk5NCwyMDAuNDk5OTk5OTk5OTk5OTQiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxIiAvPjwvc3ZnPg==\" />" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "*Exercice tiré du livre **L'informatique simplement** de J. Hromkovic et T. Kohn*" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class=\"alert alert-block alert-info\"> \n <b> Indication</b>\n <br>\nPour tracer un hexagone, la tortue doit tourner 6 fois. Comme un tour complet représente 360°, à chaque angle la tortue doit tourné de \\( \\frac{360}{6}=60 \\) degrés.\n </div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(100)\n\n# à compléter...\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(100)\n\n# à compléter...\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 13\nDessinez une chaise." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nleft(90)\nforward(100)\n\n# à compléter...\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nleft(90)\nforward(100)\n\n# à compléter...\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 14\nCommenter le programme ci-dessous afin d'expliquer le but des différents blocs du code." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\n# mettre votre commentaire\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(200)\nleft(90)\nforward(100)\nleft(90)\n\n# mettre votre commentaire\nforward(30)\n\n# mettre votre commentaire\nforward(30)\nleft(90)\nforward(50)\nleft(90)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\n# mettre votre commentaire\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(200)\nleft(90)\nforward(100)\nleft(90)\n\n# mettre votre commentaire\nforward(30)\n\n# mettre votre commentaire\nforward(30)\nleft(90)\nforward(50)\nleft(90)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 15 *\nÉcrivez un programme qui dessine une maison comme dans le schéma ci-dessous. Elle est formée de plusieurs triangles isocèles rectangles. La longueur des côtés du carré de base est de 185.\n\n\n\n*Exercice tiré du livre **L'informatique simplement** de J. Hromkovic et T. Kohn*" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class=\"alert alert-block alert-info\"> \n <b> Indication</b>\n <br>\npour connaître la longueur du toit et des diagonles, utilisez le théorème de Pythagore.\n </div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(185)\nleft(90)\n\n# à compléter...\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(185)\nleft(90)\n\n# à compléter...\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "---\n\n#### Remarque générale\n\nCe document est une adaptation d'un ressource pédagogique tiré du catalogue modulo https://modulo-info.ch/. Il est sous license Creative Commons [BY-NC-SA](https://creativecommons.org/licenses/?lang=fr)\n" } ], diff --git a/Notebooks/01_Premier_programme_corrige.ipynb b/Notebooks/01_Premier_programme_corrige.ipynb index b6b61fce554e5fcd7d8a0bf0687806ef3d2214bb..9aef552f83c75ac62fba9edc7caf2c7d13650b9d 100644 --- a/Notebooks/01_Premier_programme_corrige.ipynb +++ b/Notebooks/01_Premier_programme_corrige.ipynb @@ -1,640 +1,640 @@ { "cells": [ { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-danger\"> \n \n# Cours avec solution\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "# 1. Premier programme, premières instructions" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "Dans ce chapitre, nous explorons ce que c’est un programme et nous prenons l’exemple du dessin. Ici, un programme est une séquence d’instructions pour dessiner une image.\n\nAllons de l’avant (forward) avec la programmation. Nous allons voir que :\n\n- l’expression `from turtle import *` met à disposition les fonctions de dessin,\n\n- les instructions `forward()`, `backward()` permettent de tracer une ligne,\n\n- les instructions `left()`, `right()` permettent de changer de direction.\n\n- l'instruction `done()` permet de finaliser. Elle lance le tracage de la figure.\n\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 1.1 Le module `turtle`\n\nDans le langage de programmation Python, le module `turtle` (signifiant tortue en anglais) présente une façon sympathique pour faire des dessins. C’est pour cela que nous commençons notre aventure de programmation avec cet animal qui avance tout doucement à son propre rythme.\n\nOn s’imagine une tortue qui se déplace sur un canevas et laisse une trace.\n\nCi-dessous, vous trouvez notre premier programme de trois lignes :\n\n- dans la première ligne, nous importons toutes (`*`) les fonctions du module turtle,\n\n- avec `shape('turtle')`, nous affichons une tortue (au lieu de la flèche),\n\n- avec `forward(150)`, nous faisons avancer la tortue de 150 pixels,\n\n- avec `done()`, nous lançons de tracage de la figure." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 1\n\nAjoutez d’autres instructions telles que `backward()`, `left()` et `right()` pour faire un dessin." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class=\"alert alert-block alert-info\"><b>A savoir:</b> Cliquez sur le bouton <b>Excécuter</b> pour tester le programme. </div>" }, { + "cell_type": "code", + "execution_count": 1, "metadata": { "scrolled": true, "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nshape('turtle')\nforward(150)\n\ndone()", - "execution_count": 1, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_c4d39d4b85594a66a935de314b773424_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_c4d39d4b85594a66a935de314b773424_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_c4d39d4b85594a66a935de314b773424_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_c4d39d4b85594a66a935de314b773424_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_c4d39d4b85594a66a935de314b773424_7\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_c4d39d4b85594a66a935de314b773424_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_c4d39d4b85594a66a935de314b773424_6.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_c4d39d4b85594a66a935de314b773424_9\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_c4d39d4b85594a66a935de314b773424_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_c4d39d4b85594a66a935de314b773424_8.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_c4d39d4b85594a66a935de314b773424_11\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"150\" dur=\" 0.803s\" fill=\"freeze\" begin=\"af_c4d39d4b85594a66a935de314b773424_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_c4d39d4b85594a66a935de314b773424_10.end\" from=\"0\" to=\"0\" dur=\" 0.803s\" fill=\"freeze\"></animate></line><line x1=\"150\" y1=\"0\" x2=\"150\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_c4d39d4b85594a66a935de314b773424_13\" attributename=\"x2\" attributetype=\"XML\" from=\"150\" to=\"150\" dur=\" 0.803s\" fill=\"freeze\" begin=\"af_c4d39d4b85594a66a935de314b773424_12.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_c4d39d4b85594a66a935de314b773424_12.end\" from=\"0\" to=\"-150\" dur=\" 0.803s\" fill=\"freeze\"></animate></line><line x1=\"150\" y1=\"-150\" x2=\"150\" y2=\"-150\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_c4d39d4b85594a66a935de314b773424_14\" attributename=\"x2\" attributetype=\"XML\" from=\"150\" to=\"149.99999999999997\" dur=\" 1.605s\" fill=\"freeze\" begin=\"af_c4d39d4b85594a66a935de314b773424_13.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_c4d39d4b85594a66a935de314b773424_13.end\" from=\"-150\" to=\"150\" dur=\" 1.605s\" fill=\"freeze\"></animate></line><line x1=\"149.99999999999997\" y1=\"150\" x2=\"149.99999999999997\" y2=\"150\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_c4d39d4b85594a66a935de314b773424_15\" attributename=\"x2\" attributetype=\"XML\" from=\"149.99999999999997\" to=\"149.99999999999997\" dur=\" 0.803s\" fill=\"freeze\" begin=\"af_c4d39d4b85594a66a935de314b773424_14.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_c4d39d4b85594a66a935de314b773424_14.end\" from=\"150\" to=\"0\" dur=\" 0.803s\" fill=\"freeze\"></animate></line><line x1=\"149.99999999999997\" y1=\"0\" x2=\"149.99999999999997\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_c4d39d4b85594a66a935de314b773424_17\" attributename=\"x2\" attributetype=\"XML\" from=\"149.99999999999997\" to=\"300\" dur=\" 0.803s\" fill=\"freeze\" begin=\"af_c4d39d4b85594a66a935de314b773424_16.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_c4d39d4b85594a66a935de314b773424_16.end\" from=\"0\" to=\"0\" dur=\" 0.803s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_c4d39d4b85594a66a935de314b773424_1\" begin=\"af_c4d39d4b85594a66a935de314b773424_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_c4d39d4b85594a66a935de314b773424_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_c4d39d4b85594a66a935de314b773424_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_c4d39d4b85594a66a935de314b773424_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_c4d39d4b85594a66a935de314b773424_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_c4d39d4b85594a66a935de314b773424_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_c4d39d4b85594a66a935de314b773424_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animate id=\"af_c4d39d4b85594a66a935de314b773424_6\" begin=\"af_c4d39d4b85594a66a935de314b773424_5.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"1\" to=\"0\"></animate><animateMotion begin=\"af_c4d39d4b85594a66a935de314b773424_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"0.0,-0.0\" dur=\"1ms\" begin=\"af_c4d39d4b85594a66a935de314b773424_6.end\" fill=\"freeze\"></animateMotion></polygon><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animateMotion begin=\"af_c4d39d4b85594a66a935de314b773424_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion id=\"af_c4d39d4b85594a66a935de314b773424_5\" from=\"0.0,-0.0\" to=\"0.0,-0.0\" dur=\"1ms\" begin=\"af_c4d39d4b85594a66a935de314b773424_4.end\" fill=\"freeze\"></animateMotion><animateTransform attributename=\"transform\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_c4d39d4b85594a66a935de314b773424_4.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animate begin=\"af_c4d39d4b85594a66a935de314b773424_4.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animate id=\"af_c4d39d4b85594a66a935de314b773424_8\" begin=\"af_c4d39d4b85594a66a935de314b773424_7.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_c4d39d4b85594a66a935de314b773424_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_c4d39d4b85594a66a935de314b773424_10\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_c4d39d4b85594a66a935de314b773424_9.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_c4d39d4b85594a66a935de314b773424_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"150.0,-0.0\" dur=\" 0.803s\" begin=\"af_c4d39d4b85594a66a935de314b773424_10.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_c4d39d4b85594a66a935de314b773424_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_c4d39d4b85594a66a935de314b773424_12\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-180.0,0,0\" begin=\"af_c4d39d4b85594a66a935de314b773424_11.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_c4d39d4b85594a66a935de314b773424_12.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"150.0,-0.0\" to=\"150.0,-150.0\" dur=\" 0.803s\" begin=\"af_c4d39d4b85594a66a935de314b773424_12.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_c4d39d4b85594a66a935de314b773424_13.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"150.0,-150.0\" to=\"149.99999999999997,150.0\" dur=\" 1.605s\" begin=\"af_c4d39d4b85594a66a935de314b773424_13.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_c4d39d4b85594a66a935de314b773424_14.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"149.99999999999997,150.0\" to=\"149.99999999999997,-0.0\" dur=\" 0.803s\" begin=\"af_c4d39d4b85594a66a935de314b773424_14.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_c4d39d4b85594a66a935de314b773424_15.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_c4d39d4b85594a66a935de314b773424_16\" type=\"rotate\" from=\"-180.0,0,0\" to=\"-90.0,0,0\" begin=\"af_c4d39d4b85594a66a935de314b773424_15.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_c4d39d4b85594a66a935de314b773424_16.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"149.99999999999997,-0.0\" to=\"300.0,-0.0\" dur=\" 0.803s\" begin=\"af_c4d39d4b85594a66a935de314b773424_16.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nshape('turtle')\nforward(150)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 1, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nshape('turtle')\nforward(150)\nleft(90)\nforward(150)\nbackward(300)\nforward(150)\nright(90)\nforward(150)\n\ndone()", - "execution_count": 1, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_9385970269a344519880d5b26c6650df_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_9385970269a344519880d5b26c6650df_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_9385970269a344519880d5b26c6650df_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9385970269a344519880d5b26c6650df_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_9385970269a344519880d5b26c6650df_7\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_9385970269a344519880d5b26c6650df_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9385970269a344519880d5b26c6650df_6.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_9385970269a344519880d5b26c6650df_9\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_9385970269a344519880d5b26c6650df_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9385970269a344519880d5b26c6650df_8.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_9385970269a344519880d5b26c6650df_11\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"150\" dur=\" 0.803s\" fill=\"freeze\" begin=\"af_9385970269a344519880d5b26c6650df_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9385970269a344519880d5b26c6650df_10.end\" from=\"0\" to=\"0\" dur=\" 0.803s\" fill=\"freeze\"></animate></line><line x1=\"150\" y1=\"0\" x2=\"150\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_9385970269a344519880d5b26c6650df_13\" attributename=\"x2\" attributetype=\"XML\" from=\"150\" to=\"150\" dur=\" 0.803s\" fill=\"freeze\" begin=\"af_9385970269a344519880d5b26c6650df_12.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9385970269a344519880d5b26c6650df_12.end\" from=\"0\" to=\"-150\" dur=\" 0.803s\" fill=\"freeze\"></animate></line><line x1=\"150\" y1=\"-150\" x2=\"150\" y2=\"-150\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_9385970269a344519880d5b26c6650df_14\" attributename=\"x2\" attributetype=\"XML\" from=\"150\" to=\"149.99999999999997\" dur=\" 1.605s\" fill=\"freeze\" begin=\"af_9385970269a344519880d5b26c6650df_13.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9385970269a344519880d5b26c6650df_13.end\" from=\"-150\" to=\"150\" dur=\" 1.605s\" fill=\"freeze\"></animate></line><line x1=\"149.99999999999997\" y1=\"150\" x2=\"149.99999999999997\" y2=\"150\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_9385970269a344519880d5b26c6650df_15\" attributename=\"x2\" attributetype=\"XML\" from=\"149.99999999999997\" to=\"149.99999999999997\" dur=\" 0.803s\" fill=\"freeze\" begin=\"af_9385970269a344519880d5b26c6650df_14.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9385970269a344519880d5b26c6650df_14.end\" from=\"150\" to=\"0\" dur=\" 0.803s\" fill=\"freeze\"></animate></line><line x1=\"149.99999999999997\" y1=\"0\" x2=\"149.99999999999997\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_9385970269a344519880d5b26c6650df_17\" attributename=\"x2\" attributetype=\"XML\" from=\"149.99999999999997\" to=\"300\" dur=\" 0.803s\" fill=\"freeze\" begin=\"af_9385970269a344519880d5b26c6650df_16.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9385970269a344519880d5b26c6650df_16.end\" from=\"0\" to=\"0\" dur=\" 0.803s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_9385970269a344519880d5b26c6650df_1\" begin=\"af_9385970269a344519880d5b26c6650df_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_9385970269a344519880d5b26c6650df_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_9385970269a344519880d5b26c6650df_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_9385970269a344519880d5b26c6650df_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_9385970269a344519880d5b26c6650df_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_9385970269a344519880d5b26c6650df_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_9385970269a344519880d5b26c6650df_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animate id=\"af_9385970269a344519880d5b26c6650df_6\" begin=\"af_9385970269a344519880d5b26c6650df_5.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"1\" to=\"0\"></animate><animateMotion begin=\"af_9385970269a344519880d5b26c6650df_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"0.0,-0.0\" dur=\"1ms\" begin=\"af_9385970269a344519880d5b26c6650df_6.end\" fill=\"freeze\"></animateMotion></polygon><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animateMotion begin=\"af_9385970269a344519880d5b26c6650df_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion id=\"af_9385970269a344519880d5b26c6650df_5\" from=\"0.0,-0.0\" to=\"0.0,-0.0\" dur=\"1ms\" begin=\"af_9385970269a344519880d5b26c6650df_4.end\" fill=\"freeze\"></animateMotion><animateTransform attributename=\"transform\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_9385970269a344519880d5b26c6650df_4.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animate begin=\"af_9385970269a344519880d5b26c6650df_4.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animate id=\"af_9385970269a344519880d5b26c6650df_8\" begin=\"af_9385970269a344519880d5b26c6650df_7.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_9385970269a344519880d5b26c6650df_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_9385970269a344519880d5b26c6650df_10\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_9385970269a344519880d5b26c6650df_9.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_9385970269a344519880d5b26c6650df_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"150.0,-0.0\" dur=\" 0.803s\" begin=\"af_9385970269a344519880d5b26c6650df_10.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_9385970269a344519880d5b26c6650df_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_9385970269a344519880d5b26c6650df_12\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-180.0,0,0\" begin=\"af_9385970269a344519880d5b26c6650df_11.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_9385970269a344519880d5b26c6650df_12.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"150.0,-0.0\" to=\"150.0,-150.0\" dur=\" 0.803s\" begin=\"af_9385970269a344519880d5b26c6650df_12.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_9385970269a344519880d5b26c6650df_13.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"150.0,-150.0\" to=\"149.99999999999997,150.0\" dur=\" 1.605s\" begin=\"af_9385970269a344519880d5b26c6650df_13.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_9385970269a344519880d5b26c6650df_14.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"149.99999999999997,150.0\" to=\"149.99999999999997,-0.0\" dur=\" 0.803s\" begin=\"af_9385970269a344519880d5b26c6650df_14.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_9385970269a344519880d5b26c6650df_15.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_9385970269a344519880d5b26c6650df_16\" type=\"rotate\" from=\"-180.0,0,0\" to=\"-90.0,0,0\" begin=\"af_9385970269a344519880d5b26c6650df_15.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_9385970269a344519880d5b26c6650df_16.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"149.99999999999997,-0.0\" to=\"300.0,-0.0\" dur=\" 0.803s\" begin=\"af_9385970269a344519880d5b26c6650df_16.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nshape('turtle')\nforward(150)\nleft(90)\nforward(150)\nbackward(300)\nforward(150)\nright(90)\nforward(150)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### A retenir\nLa tortue peut se déplacer et dessiner une trace avec les 4 fonctions:\n\n- `forward(d)` pour avancer d'une distance `d` (en pixels)\n- `backward(d)` pour reculer\n- `left(a)` pour tourner à gauche d'un angle `a` (en degrés)\n- `right(a)` pour tourner à droite" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "***\n## 1.2 Le canevas\n\nAu départ, la tortue se trouve au centre d'une zone rectangulaire appelée _canevas_. Ce rectangle a les propriétés suivantes :\n\n- l'origine (0, 0) se trouve au centre,\n- l'axe horizontal x, s'étend de -300 à +300 (à droite),\n- l'axe vertical y, s'étend de -200 à +200 (en haut).\n\n\n\n### Exercice 2\nCompléter le programme ci-dessous pour mener la tortue tout en bas du canevas. Ensuite, ajoutez une diagonale." }, { + "cell_type": "code", + "execution_count": 2, "metadata": { "scrolled": true, "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nshape('turtle')\nforward(300)\nbackward(600)\nforward(300)\n\nleft(90)\nforward(200)\n\n\ndone()", - "execution_count": 2, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_8cc44165c3514bc1a8783336c8d8c475_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_8cc44165c3514bc1a8783336c8d8c475_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_8cc44165c3514bc1a8783336c8d8c475_7\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_6.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_8cc44165c3514bc1a8783336c8d8c475_9\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_8.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_8cc44165c3514bc1a8783336c8d8c475_11\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"300\" dur=\" 1.605s\" fill=\"freeze\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_10.end\" from=\"0\" to=\"0\" dur=\" 1.605s\" fill=\"freeze\"></animate></line><line x1=\"300\" y1=\"0\" x2=\"300\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_8cc44165c3514bc1a8783336c8d8c475_12\" attributename=\"x2\" attributetype=\"XML\" from=\"300\" to=\"-300\" dur=\" 3.211s\" fill=\"freeze\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_11.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_11.end\" from=\"0\" to=\"0\" dur=\" 3.211s\" fill=\"freeze\"></animate></line><line x1=\"-300\" y1=\"0\" x2=\"-300\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_8cc44165c3514bc1a8783336c8d8c475_13\" attributename=\"x2\" attributetype=\"XML\" from=\"-300\" to=\"0\" dur=\" 1.605s\" fill=\"freeze\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_12.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_12.end\" from=\"0\" to=\"0\" dur=\" 1.605s\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_8cc44165c3514bc1a8783336c8d8c475_15\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"1.2246467991473532e-14\" dur=\" 1.070s\" fill=\"freeze\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_14.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_14.end\" from=\"0\" to=\"-200\" dur=\" 1.070s\" fill=\"freeze\"></animate></line><line x1=\"1.2246467991473532e-14\" y1=\"-200\" x2=\"1.2246467991473532e-14\" y2=\"-200\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_8cc44165c3514bc1a8783336c8d8c475_16\" attributename=\"x2\" attributetype=\"XML\" from=\"1.2246467991473532e-14\" to=\"-1.2246467991473532e-14\" dur=\" 2.141s\" fill=\"freeze\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_15.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_15.end\" from=\"-200\" to=\"200\" dur=\" 2.141s\" fill=\"freeze\"></animate></line><line x1=\"-1.2246467991473532e-14\" y1=\"200\" x2=\"-1.2246467991473532e-14\" y2=\"200\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_8cc44165c3514bc1a8783336c8d8c475_18\" attributename=\"x2\" attributetype=\"XML\" from=\"-1.2246467991473532e-14\" to=\"141.4213562373095\" dur=\" 1.070s\" fill=\"freeze\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_17.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_17.end\" from=\"200\" to=\"58.57864376269052\" dur=\" 1.070s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_8cc44165c3514bc1a8783336c8d8c475_1\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_8cc44165c3514bc1a8783336c8d8c475_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_8cc44165c3514bc1a8783336c8d8c475_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_8cc44165c3514bc1a8783336c8d8c475_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_8cc44165c3514bc1a8783336c8d8c475_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animate id=\"af_8cc44165c3514bc1a8783336c8d8c475_6\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_5.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"1\" to=\"0\"></animate><animateMotion begin=\"af_8cc44165c3514bc1a8783336c8d8c475_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"0.0,-0.0\" dur=\"1ms\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_6.end\" fill=\"freeze\"></animateMotion></polygon><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animateMotion begin=\"af_8cc44165c3514bc1a8783336c8d8c475_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion id=\"af_8cc44165c3514bc1a8783336c8d8c475_5\" from=\"0.0,-0.0\" to=\"0.0,-0.0\" dur=\"1ms\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_4.end\" fill=\"freeze\"></animateMotion><animateTransform attributename=\"transform\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_4.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animate begin=\"af_8cc44165c3514bc1a8783336c8d8c475_4.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animate id=\"af_8cc44165c3514bc1a8783336c8d8c475_8\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_7.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_8cc44165c3514bc1a8783336c8d8c475_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_8cc44165c3514bc1a8783336c8d8c475_10\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_9.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_8cc44165c3514bc1a8783336c8d8c475_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"300.0,-0.0\" dur=\" 1.605s\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_10.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_8cc44165c3514bc1a8783336c8d8c475_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"300.0,-0.0\" to=\"-300.0,-0.0\" dur=\" 3.211s\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_11.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_8cc44165c3514bc1a8783336c8d8c475_12.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-300.0,-0.0\" to=\"0.0,-0.0\" dur=\" 1.605s\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_12.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_8cc44165c3514bc1a8783336c8d8c475_13.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_8cc44165c3514bc1a8783336c8d8c475_14\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-180.0,0,0\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_13.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_8cc44165c3514bc1a8783336c8d8c475_14.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"1.2246467991473532e-14,-200.0\" dur=\" 1.070s\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_14.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_8cc44165c3514bc1a8783336c8d8c475_15.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"1.2246467991473532e-14,-200.0\" to=\"-1.2246467991473532e-14,200.0\" dur=\" 2.141s\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_15.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_8cc44165c3514bc1a8783336c8d8c475_16.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_8cc44165c3514bc1a8783336c8d8c475_17\" type=\"rotate\" from=\"-180.0,0,0\" to=\"-135.0,0,0\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_16.end\" dur=\" 0.042s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_8cc44165c3514bc1a8783336c8d8c475_17.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-1.2246467991473532e-14,200.0\" to=\"141.4213562373095,58.57864376269052\" dur=\" 1.070s\" begin=\"af_8cc44165c3514bc1a8783336c8d8c475_17.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nshape('turtle')\nforward(300)\nbackward(600)\nforward(300)\n\nleft(90)\nforward(200)\n\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 2, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nshape('turtle')\nforward(150)\nleft(90)\nforward(150)\nbackward(300)\nforward(150)\nright(90)\nforward(150)\n\ndone()", - "execution_count": 2, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_35930b327d2b4c20900c7dd4c9309b10_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_35930b327d2b4c20900c7dd4c9309b10_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_35930b327d2b4c20900c7dd4c9309b10_7\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_6.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_35930b327d2b4c20900c7dd4c9309b10_9\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_8.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_35930b327d2b4c20900c7dd4c9309b10_11\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"150\" dur=\" 0.803s\" fill=\"freeze\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_10.end\" from=\"0\" to=\"0\" dur=\" 0.803s\" fill=\"freeze\"></animate></line><line x1=\"150\" y1=\"0\" x2=\"150\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_35930b327d2b4c20900c7dd4c9309b10_13\" attributename=\"x2\" attributetype=\"XML\" from=\"150\" to=\"150\" dur=\" 0.803s\" fill=\"freeze\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_12.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_12.end\" from=\"0\" to=\"-150\" dur=\" 0.803s\" fill=\"freeze\"></animate></line><line x1=\"150\" y1=\"-150\" x2=\"150\" y2=\"-150\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_35930b327d2b4c20900c7dd4c9309b10_14\" attributename=\"x2\" attributetype=\"XML\" from=\"150\" to=\"149.99999999999997\" dur=\" 1.605s\" fill=\"freeze\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_13.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_13.end\" from=\"-150\" to=\"150\" dur=\" 1.605s\" fill=\"freeze\"></animate></line><line x1=\"149.99999999999997\" y1=\"150\" x2=\"149.99999999999997\" y2=\"150\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_35930b327d2b4c20900c7dd4c9309b10_15\" attributename=\"x2\" attributetype=\"XML\" from=\"149.99999999999997\" to=\"149.99999999999997\" dur=\" 0.803s\" fill=\"freeze\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_14.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_14.end\" from=\"150\" to=\"0\" dur=\" 0.803s\" fill=\"freeze\"></animate></line><line x1=\"149.99999999999997\" y1=\"0\" x2=\"149.99999999999997\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_35930b327d2b4c20900c7dd4c9309b10_17\" attributename=\"x2\" attributetype=\"XML\" from=\"149.99999999999997\" to=\"300\" dur=\" 0.803s\" fill=\"freeze\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_16.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_16.end\" from=\"0\" to=\"0\" dur=\" 0.803s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_35930b327d2b4c20900c7dd4c9309b10_1\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_35930b327d2b4c20900c7dd4c9309b10_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_35930b327d2b4c20900c7dd4c9309b10_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_35930b327d2b4c20900c7dd4c9309b10_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_35930b327d2b4c20900c7dd4c9309b10_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animate id=\"af_35930b327d2b4c20900c7dd4c9309b10_6\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_5.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"1\" to=\"0\"></animate><animateMotion begin=\"af_35930b327d2b4c20900c7dd4c9309b10_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"0.0,-0.0\" dur=\"1ms\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_6.end\" fill=\"freeze\"></animateMotion></polygon><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animateMotion begin=\"af_35930b327d2b4c20900c7dd4c9309b10_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion id=\"af_35930b327d2b4c20900c7dd4c9309b10_5\" from=\"0.0,-0.0\" to=\"0.0,-0.0\" dur=\"1ms\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_4.end\" fill=\"freeze\"></animateMotion><animateTransform attributename=\"transform\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_4.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animate begin=\"af_35930b327d2b4c20900c7dd4c9309b10_4.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animate id=\"af_35930b327d2b4c20900c7dd4c9309b10_8\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_7.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_35930b327d2b4c20900c7dd4c9309b10_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_35930b327d2b4c20900c7dd4c9309b10_10\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_9.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_35930b327d2b4c20900c7dd4c9309b10_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"150.0,-0.0\" dur=\" 0.803s\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_10.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_35930b327d2b4c20900c7dd4c9309b10_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_35930b327d2b4c20900c7dd4c9309b10_12\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-180.0,0,0\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_11.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_35930b327d2b4c20900c7dd4c9309b10_12.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"150.0,-0.0\" to=\"150.0,-150.0\" dur=\" 0.803s\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_12.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_35930b327d2b4c20900c7dd4c9309b10_13.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"150.0,-150.0\" to=\"149.99999999999997,150.0\" dur=\" 1.605s\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_13.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_35930b327d2b4c20900c7dd4c9309b10_14.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"149.99999999999997,150.0\" to=\"149.99999999999997,-0.0\" dur=\" 0.803s\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_14.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_35930b327d2b4c20900c7dd4c9309b10_15.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_35930b327d2b4c20900c7dd4c9309b10_16\" type=\"rotate\" from=\"-180.0,0,0\" to=\"-90.0,0,0\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_15.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_35930b327d2b4c20900c7dd4c9309b10_16.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"149.99999999999997,-0.0\" to=\"300.0,-0.0\" dur=\" 0.803s\" begin=\"af_35930b327d2b4c20900c7dd4c9309b10_16.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nshape('turtle')\nforward(150)\nleft(90)\nforward(150)\nbackward(300)\nforward(150)\nright(90)\nforward(150)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "***\n## 1.3 Une séquence\n\nUn programme est une séquence d'instructions. Le bloc de 9 instructions ci-dessous indique comment dessiner un carré. La tortue doit avancer, tourner, avancer, tourner, etc.\n\n### Exercise 3\nModifiez ce code pour en faire un rectangle, au lieu d'un carré." }, { + "cell_type": "code", + "execution_count": 3, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\n\n\ndone()", - "execution_count": 3, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_5107ee3bfe0f469580acf3dbb99502df_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_5107ee3bfe0f469580acf3dbb99502df_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_5107ee3bfe0f469580acf3dbb99502df_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"200\" dur=\" 1.070s\" fill=\"freeze\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_4.end\" from=\"0\" to=\"0\" dur=\" 1.070s\" fill=\"freeze\"></animate></line><line x1=\"200\" y1=\"0\" x2=\"200\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_5107ee3bfe0f469580acf3dbb99502df_7\" attributename=\"x2\" attributetype=\"XML\" from=\"200\" to=\"200\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_6.end\" from=\"0\" to=\"-100\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"200\" y1=\"-100\" x2=\"200\" y2=\"-100\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_5107ee3bfe0f469580acf3dbb99502df_9\" attributename=\"x2\" attributetype=\"XML\" from=\"200\" to=\"0\" dur=\" 1.070s\" fill=\"freeze\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_8.end\" from=\"-100\" to=\"-100.00000000000003\" dur=\" 1.070s\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"-100.00000000000003\" x2=\"0\" y2=\"-100.00000000000003\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_5107ee3bfe0f469580acf3dbb99502df_11\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"-1.8369701987210297e-14\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_10.end\" from=\"-100.00000000000003\" to=\"-2.842170943040401e-14\" dur=\" 0.535s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_5107ee3bfe0f469580acf3dbb99502df_1\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_5107ee3bfe0f469580acf3dbb99502df_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_5107ee3bfe0f469580acf3dbb99502df_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_5107ee3bfe0f469580acf3dbb99502df_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_5107ee3bfe0f469580acf3dbb99502df_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_5107ee3bfe0f469580acf3dbb99502df_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"200.0,-0.0\" dur=\" 1.070s\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_5107ee3bfe0f469580acf3dbb99502df_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_5107ee3bfe0f469580acf3dbb99502df_6\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-180.0,0,0\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_5.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_5107ee3bfe0f469580acf3dbb99502df_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"200.0,-0.0\" to=\"200.0,-100.0\" dur=\" 0.535s\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_5107ee3bfe0f469580acf3dbb99502df_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_5107ee3bfe0f469580acf3dbb99502df_8\" type=\"rotate\" from=\"-180.0,0,0\" to=\"-270.0,0,0\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_7.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_5107ee3bfe0f469580acf3dbb99502df_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"200.0,-100.0\" to=\"0.0,-100.00000000000003\" dur=\" 1.070s\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_8.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_5107ee3bfe0f469580acf3dbb99502df_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_5107ee3bfe0f469580acf3dbb99502df_10\" type=\"rotate\" from=\"-270.0,0,0\" to=\"-360.0,0,0\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_9.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_5107ee3bfe0f469580acf3dbb99502df_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-100.00000000000003\" to=\"-1.8369701987210297e-14,-2.842170943040401e-14\" dur=\" 0.535s\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_10.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_5107ee3bfe0f469580acf3dbb99502df_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_5107ee3bfe0f469580acf3dbb99502df_12\" type=\"rotate\" from=\"-360.0,0,0\" to=\"-450.0,0,0\" begin=\"af_5107ee3bfe0f469580acf3dbb99502df_11.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\n\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 3, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(200)\nleft(90)\nforward(100)\nleft(90)\n\ndone()", - "execution_count": 3, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_e405b857b9be4a7c9d52a36c57dc01ea_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e405b857b9be4a7c9d52a36c57dc01ea_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e405b857b9be4a7c9d52a36c57dc01ea_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"200\" dur=\" 1.070s\" fill=\"freeze\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_4.end\" from=\"0\" to=\"0\" dur=\" 1.070s\" fill=\"freeze\"></animate></line><line x1=\"200\" y1=\"0\" x2=\"200\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e405b857b9be4a7c9d52a36c57dc01ea_7\" attributename=\"x2\" attributetype=\"XML\" from=\"200\" to=\"200\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_6.end\" from=\"0\" to=\"-100\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"200\" y1=\"-100\" x2=\"200\" y2=\"-100\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e405b857b9be4a7c9d52a36c57dc01ea_9\" attributename=\"x2\" attributetype=\"XML\" from=\"200\" to=\"0\" dur=\" 1.070s\" fill=\"freeze\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_8.end\" from=\"-100\" to=\"-100.00000000000003\" dur=\" 1.070s\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"-100.00000000000003\" x2=\"0\" y2=\"-100.00000000000003\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e405b857b9be4a7c9d52a36c57dc01ea_11\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"-1.8369701987210297e-14\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_10.end\" from=\"-100.00000000000003\" to=\"-2.842170943040401e-14\" dur=\" 0.535s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_e405b857b9be4a7c9d52a36c57dc01ea_1\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e405b857b9be4a7c9d52a36c57dc01ea_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e405b857b9be4a7c9d52a36c57dc01ea_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"200.0,-0.0\" dur=\" 1.070s\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e405b857b9be4a7c9d52a36c57dc01ea_6\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-180.0,0,0\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_5.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"200.0,-0.0\" to=\"200.0,-100.0\" dur=\" 0.535s\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e405b857b9be4a7c9d52a36c57dc01ea_8\" type=\"rotate\" from=\"-180.0,0,0\" to=\"-270.0,0,0\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_7.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"200.0,-100.0\" to=\"0.0,-100.00000000000003\" dur=\" 1.070s\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_8.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e405b857b9be4a7c9d52a36c57dc01ea_10\" type=\"rotate\" from=\"-270.0,0,0\" to=\"-360.0,0,0\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_9.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-100.00000000000003\" to=\"-1.8369701987210297e-14,-2.842170943040401e-14\" dur=\" 0.535s\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_10.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e405b857b9be4a7c9d52a36c57dc01ea_12\" type=\"rotate\" from=\"-360.0,0,0\" to=\"-450.0,0,0\" begin=\"af_e405b857b9be4a7c9d52a36c57dc01ea_11.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(200)\nleft(90)\nforward(100)\nleft(90)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "***\n\n## 1.4 Épaisseur de ligne\n\nLa fonction `width(d)` (épaisseur en anglais) permet de définir l'épaisseur de la ligne.\nVoici un triangle où chaque côté a une épaisseur différente.\n\n### Exercise 4\nExplorez différentes épaisseurs de ligne." }, { + "cell_type": "code", + "execution_count": 4, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(200)\nleft(120)\n\nwidth(5)\nforward(200)\nleft(120)\n\nwidth(10)\nforward(200)\n\ndone()", - "execution_count": 4, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_37e2e11ab7124ed0818c71c0fdad1101_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_37e2e11ab7124ed0818c71c0fdad1101_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_37e2e11ab7124ed0818c71c0fdad1101_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"200\" dur=\" 1.070s\" fill=\"freeze\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_4.end\" from=\"0\" to=\"0\" dur=\" 1.070s\" fill=\"freeze\"></animate></line><line x1=\"200\" y1=\"0\" x2=\"200\" y2=\"0\" style=\"stroke: black;stroke-width: 5\"><animate id=\"af_37e2e11ab7124ed0818c71c0fdad1101_7\" attributename=\"x2\" attributetype=\"XML\" from=\"200\" to=\"100.00000000000004\" dur=\" 1.070s\" fill=\"freeze\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_6.end\" from=\"0\" to=\"-173.20508075688775\" dur=\" 1.070s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_6.end\" attributetype=\"xml\" to=\"round\" dur=\" 1.070s\" fill=\"freeze\"></set></line><line x1=\"100.00000000000004\" y1=\"-173.20508075688775\" x2=\"100.00000000000004\" y2=\"-173.20508075688775\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_37e2e11ab7124ed0818c71c0fdad1101_9\" attributename=\"x2\" attributetype=\"XML\" from=\"100.00000000000004\" to=\"-4.263256414560601e-14\" dur=\" 1.070s\" fill=\"freeze\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_8.end\" from=\"-173.20508075688775\" to=\"-5.684341886080802e-14\" dur=\" 1.070s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_8.end\" attributetype=\"xml\" to=\"round\" dur=\" 1.070s\" fill=\"freeze\"></set></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_37e2e11ab7124ed0818c71c0fdad1101_1\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_37e2e11ab7124ed0818c71c0fdad1101_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_37e2e11ab7124ed0818c71c0fdad1101_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"200.0,-0.0\" dur=\" 1.070s\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_37e2e11ab7124ed0818c71c0fdad1101_6\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-210.0,0,0\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_5.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"200.0,-0.0\" to=\"100.00000000000004,-173.20508075688775\" dur=\" 1.070s\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_37e2e11ab7124ed0818c71c0fdad1101_8\" type=\"rotate\" from=\"-210.0,0,0\" to=\"-330.0,0,0\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_7.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"100.00000000000004,-173.20508075688775\" to=\"-4.263256414560601e-14,-5.684341886080802e-14\" dur=\" 1.070s\" begin=\"af_37e2e11ab7124ed0818c71c0fdad1101_8.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nforward(200)\nleft(120)\n\nwidth(5)\nforward(200)\nleft(120)\n\nwidth(10)\nforward(200)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 4, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(200)\nleft(120)\n\nwidth(5)\nforward(200)\nleft(120)\n\nwidth(10)\nforward(200)\n\ndone()", - "execution_count": 4, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_cd7e1af9d72744b2bd108dbe7babcd95_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_cd7e1af9d72744b2bd108dbe7babcd95_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_cd7e1af9d72744b2bd108dbe7babcd95_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"200\" dur=\" 1.070s\" fill=\"freeze\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_4.end\" from=\"0\" to=\"0\" dur=\" 1.070s\" fill=\"freeze\"></animate></line><line x1=\"200\" y1=\"0\" x2=\"200\" y2=\"0\" style=\"stroke: black;stroke-width: 5\"><animate id=\"af_cd7e1af9d72744b2bd108dbe7babcd95_7\" attributename=\"x2\" attributetype=\"XML\" from=\"200\" to=\"100.00000000000004\" dur=\" 1.070s\" fill=\"freeze\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_6.end\" from=\"0\" to=\"-173.20508075688775\" dur=\" 1.070s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_6.end\" attributetype=\"xml\" to=\"round\" dur=\" 1.070s\" fill=\"freeze\"></set></line><line x1=\"100.00000000000004\" y1=\"-173.20508075688775\" x2=\"100.00000000000004\" y2=\"-173.20508075688775\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_cd7e1af9d72744b2bd108dbe7babcd95_9\" attributename=\"x2\" attributetype=\"XML\" from=\"100.00000000000004\" to=\"-4.263256414560601e-14\" dur=\" 1.070s\" fill=\"freeze\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_8.end\" from=\"-173.20508075688775\" to=\"-5.684341886080802e-14\" dur=\" 1.070s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_8.end\" attributetype=\"xml\" to=\"round\" dur=\" 1.070s\" fill=\"freeze\"></set></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_cd7e1af9d72744b2bd108dbe7babcd95_1\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_cd7e1af9d72744b2bd108dbe7babcd95_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_cd7e1af9d72744b2bd108dbe7babcd95_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"200.0,-0.0\" dur=\" 1.070s\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_cd7e1af9d72744b2bd108dbe7babcd95_6\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-210.0,0,0\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_5.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"200.0,-0.0\" to=\"100.00000000000004,-173.20508075688775\" dur=\" 1.070s\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_cd7e1af9d72744b2bd108dbe7babcd95_8\" type=\"rotate\" from=\"-210.0,0,0\" to=\"-330.0,0,0\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_7.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"100.00000000000004,-173.20508075688775\" to=\"-4.263256414560601e-14,-5.684341886080802e-14\" dur=\" 1.070s\" begin=\"af_cd7e1af9d72744b2bd108dbe7babcd95_8.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nforward(200)\nleft(120)\n\nwidth(5)\nforward(200)\nleft(120)\n\nwidth(10)\nforward(200)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "***\n\n## 1.5 Maison avec toit\n\nNous dessinons une maison et marquons le toit par une ligne plus épaisse.\n\n### Exercise 5\nDoublez l'épaisseur du toit. Ensuite, doublez la hauteur de la maison." }, { + "cell_type": "code", + "execution_count": 5, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(100)\nleft(90)\nforward(60)\nleft(45)\nwidth(5)\nforward(71)\nleft(90)\nforward(71)\nwidth(1)\nleft(45)\nforward(60)\nleft(90)\n\ndone()", - "execution_count": 5, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_b8b73c2652d74f14918d6997e7f04131_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_b8b73c2652d74f14918d6997e7f04131_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_b8b73c2652d74f14918d6997e7f04131_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"100\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_4.end\" from=\"0\" to=\"0\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_b8b73c2652d74f14918d6997e7f04131_7\" attributename=\"x2\" attributetype=\"XML\" from=\"100\" to=\"100.00000000000001\" dur=\" 0.642s\" fill=\"freeze\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_6.end\" from=\"0\" to=\"-120\" dur=\" 0.642s\" fill=\"freeze\"></animate></line><line x1=\"100.00000000000001\" y1=\"-120\" x2=\"100.00000000000001\" y2=\"-120\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_b8b73c2652d74f14918d6997e7f04131_9\" attributename=\"x2\" attributetype=\"XML\" from=\"100.00000000000001\" to=\"49.79541853575515\" dur=\" 0.380s\" fill=\"freeze\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_8.end\" from=\"-120\" to=\"-170.20458146424488\" dur=\" 0.380s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_8.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.380s\" fill=\"freeze\"></set></line><line x1=\"49.79541853575515\" y1=\"-170.20458146424488\" x2=\"49.79541853575515\" y2=\"-170.20458146424488\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_b8b73c2652d74f14918d6997e7f04131_11\" attributename=\"x2\" attributetype=\"XML\" from=\"49.79541853575515\" to=\"-0.40916292848974223\" dur=\" 0.380s\" fill=\"freeze\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_10.end\" from=\"-170.20458146424488\" to=\"-120.00000000000001\" dur=\" 0.380s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_10.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.380s\" fill=\"freeze\"></set></line><line x1=\"-0.40916292848974223\" y1=\"-120.00000000000001\" x2=\"-0.40916292848974223\" y2=\"-120.00000000000001\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_b8b73c2652d74f14918d6997e7f04131_13\" attributename=\"x2\" attributetype=\"XML\" from=\"-0.40916292848974223\" to=\"-0.40916292848976427\" dur=\" 0.642s\" fill=\"freeze\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_12.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_12.end\" from=\"-120.00000000000001\" to=\"-1.4210854715202004e-14\" dur=\" 0.642s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_b8b73c2652d74f14918d6997e7f04131_1\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_b8b73c2652d74f14918d6997e7f04131_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_b8b73c2652d74f14918d6997e7f04131_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_b8b73c2652d74f14918d6997e7f04131_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_b8b73c2652d74f14918d6997e7f04131_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_b8b73c2652d74f14918d6997e7f04131_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"100.0,-0.0\" dur=\" 0.535s\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_b8b73c2652d74f14918d6997e7f04131_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_b8b73c2652d74f14918d6997e7f04131_6\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-180.0,0,0\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_5.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_b8b73c2652d74f14918d6997e7f04131_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"100.0,-0.0\" to=\"100.00000000000001,-120.0\" dur=\" 0.642s\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_b8b73c2652d74f14918d6997e7f04131_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_b8b73c2652d74f14918d6997e7f04131_8\" type=\"rotate\" from=\"-180.0,0,0\" to=\"-225.0,0,0\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_7.end\" dur=\" 0.042s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_b8b73c2652d74f14918d6997e7f04131_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"100.00000000000001,-120.0\" to=\"49.79541853575515,-170.20458146424488\" dur=\" 0.380s\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_8.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_b8b73c2652d74f14918d6997e7f04131_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_b8b73c2652d74f14918d6997e7f04131_10\" type=\"rotate\" from=\"-225.0,0,0\" to=\"-315.0,0,0\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_9.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_b8b73c2652d74f14918d6997e7f04131_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"49.79541853575515,-170.20458146424488\" to=\"-0.40916292848974223,-120.00000000000001\" dur=\" 0.380s\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_10.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_b8b73c2652d74f14918d6997e7f04131_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_b8b73c2652d74f14918d6997e7f04131_12\" type=\"rotate\" from=\"-315.0,0,0\" to=\"-360.0,0,0\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_11.end\" dur=\" 0.042s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_b8b73c2652d74f14918d6997e7f04131_12.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-0.40916292848974223,-120.00000000000001\" to=\"-0.40916292848976427,-1.4210854715202004e-14\" dur=\" 0.642s\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_12.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_b8b73c2652d74f14918d6997e7f04131_13.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_b8b73c2652d74f14918d6997e7f04131_14\" type=\"rotate\" from=\"-360.0,0,0\" to=\"-450.0,0,0\" begin=\"af_b8b73c2652d74f14918d6997e7f04131_13.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nforward(100)\nleft(90)\nforward(60)\nleft(45)\nwidth(5)\nforward(71)\nleft(90)\nforward(71)\nwidth(1)\nleft(45)\nforward(60)\nleft(90)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 5, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(100)\nleft(90)\nforward(120)\nleft(45)\nwidth(10)\nforward(71)\nleft(90)\nforward(71)\nwidth(1)\nleft(45)\nforward(120)\nleft(90)\n\ndone()", - "execution_count": 5, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_aafebf9dc700473d8b01f00ba2465a6b_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_aafebf9dc700473d8b01f00ba2465a6b_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_aafebf9dc700473d8b01f00ba2465a6b_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"100\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_4.end\" from=\"0\" to=\"0\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_aafebf9dc700473d8b01f00ba2465a6b_7\" attributename=\"x2\" attributetype=\"XML\" from=\"100\" to=\"100.00000000000001\" dur=\" 0.642s\" fill=\"freeze\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_6.end\" from=\"0\" to=\"-120\" dur=\" 0.642s\" fill=\"freeze\"></animate></line><line x1=\"100.00000000000001\" y1=\"-120\" x2=\"100.00000000000001\" y2=\"-120\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_aafebf9dc700473d8b01f00ba2465a6b_9\" attributename=\"x2\" attributetype=\"XML\" from=\"100.00000000000001\" to=\"49.79541853575515\" dur=\" 0.380s\" fill=\"freeze\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_8.end\" from=\"-120\" to=\"-170.20458146424488\" dur=\" 0.380s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_8.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.380s\" fill=\"freeze\"></set></line><line x1=\"49.79541853575515\" y1=\"-170.20458146424488\" x2=\"49.79541853575515\" y2=\"-170.20458146424488\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_aafebf9dc700473d8b01f00ba2465a6b_11\" attributename=\"x2\" attributetype=\"XML\" from=\"49.79541853575515\" to=\"-0.40916292848974223\" dur=\" 0.380s\" fill=\"freeze\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_10.end\" from=\"-170.20458146424488\" to=\"-120.00000000000001\" dur=\" 0.380s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_10.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.380s\" fill=\"freeze\"></set></line><line x1=\"-0.40916292848974223\" y1=\"-120.00000000000001\" x2=\"-0.40916292848974223\" y2=\"-120.00000000000001\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_aafebf9dc700473d8b01f00ba2465a6b_13\" attributename=\"x2\" attributetype=\"XML\" from=\"-0.40916292848974223\" to=\"-0.40916292848976427\" dur=\" 0.642s\" fill=\"freeze\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_12.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_12.end\" from=\"-120.00000000000001\" to=\"-1.4210854715202004e-14\" dur=\" 0.642s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_aafebf9dc700473d8b01f00ba2465a6b_1\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aafebf9dc700473d8b01f00ba2465a6b_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aafebf9dc700473d8b01f00ba2465a6b_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"100.0,-0.0\" dur=\" 0.535s\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aafebf9dc700473d8b01f00ba2465a6b_6\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-180.0,0,0\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_5.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"100.0,-0.0\" to=\"100.00000000000001,-120.0\" dur=\" 0.642s\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aafebf9dc700473d8b01f00ba2465a6b_8\" type=\"rotate\" from=\"-180.0,0,0\" to=\"-225.0,0,0\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_7.end\" dur=\" 0.042s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"100.00000000000001,-120.0\" to=\"49.79541853575515,-170.20458146424488\" dur=\" 0.380s\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_8.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aafebf9dc700473d8b01f00ba2465a6b_10\" type=\"rotate\" from=\"-225.0,0,0\" to=\"-315.0,0,0\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_9.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"49.79541853575515,-170.20458146424488\" to=\"-0.40916292848974223,-120.00000000000001\" dur=\" 0.380s\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_10.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aafebf9dc700473d8b01f00ba2465a6b_12\" type=\"rotate\" from=\"-315.0,0,0\" to=\"-360.0,0,0\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_11.end\" dur=\" 0.042s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_12.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-0.40916292848974223,-120.00000000000001\" to=\"-0.40916292848976427,-1.4210854715202004e-14\" dur=\" 0.642s\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_12.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_13.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aafebf9dc700473d8b01f00ba2465a6b_14\" type=\"rotate\" from=\"-360.0,0,0\" to=\"-450.0,0,0\" begin=\"af_aafebf9dc700473d8b01f00ba2465a6b_13.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nforward(100)\nleft(90)\nforward(120)\nleft(45)\nwidth(10)\nforward(71)\nleft(90)\nforward(71)\nwidth(1)\nleft(45)\nforward(120)\nleft(90)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "***\n\n## 1.6 Raquette de ping-pong\n\nL'épaisseur de ligne est très utile dans le dessin.\n\n## Exercise 6\nTransformez la raquette de ping-pong en haltères de musculation." }, { + "cell_type": "code", + "execution_count": 6, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nwidth(20)\nforward(100)\nwidth(80)\nforward(20)\n\ndone()", - "execution_count": 6, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_4d8ff9cc9f784073b92931526cbf3dd6_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4d8ff9cc9f784073b92931526cbf3dd6_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 20\"><animate id=\"af_4d8ff9cc9f784073b92931526cbf3dd6_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"100\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_4.end\" from=\"0\" to=\"0\" dur=\" 0.535s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_4.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.535s\" fill=\"freeze\"></set></line><line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"0\" style=\"stroke: black;stroke-width: 80\"><animate id=\"af_4d8ff9cc9f784073b92931526cbf3dd6_6\" attributename=\"x2\" attributetype=\"XML\" from=\"100\" to=\"110\" dur=\" 0.054s\" fill=\"freeze\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_5.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_5.end\" from=\"0\" to=\"0\" dur=\" 0.054s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_5.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.054s\" fill=\"freeze\"></set></line><line x1=\"110\" y1=\"0\" x2=\"110\" y2=\"0\" style=\"stroke: black;stroke-width: 20\"><animate id=\"af_4d8ff9cc9f784073b92931526cbf3dd6_8\" attributename=\"x2\" attributetype=\"XML\" from=\"110\" to=\"-40\" dur=\" 0.803s\" fill=\"freeze\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_7.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_7.end\" from=\"0\" to=\"-1.8369701987210297e-14\" dur=\" 0.803s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_7.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.803s\" fill=\"freeze\"></set></line><line x1=\"-40\" y1=\"-1.8369701987210297e-14\" x2=\"-40\" y2=\"-1.8369701987210297e-14\" style=\"stroke: black;stroke-width: 80\"><animate id=\"af_4d8ff9cc9f784073b92931526cbf3dd6_9\" attributename=\"x2\" attributetype=\"XML\" from=\"-40\" to=\"-50\" dur=\" 0.054s\" fill=\"freeze\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_8.end\" from=\"-1.8369701987210297e-14\" to=\"-1.9594348786357652e-14\" dur=\" 0.054s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_8.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.054s\" fill=\"freeze\"></set></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_4d8ff9cc9f784073b92931526cbf3dd6_1\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4d8ff9cc9f784073b92931526cbf3dd6_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4d8ff9cc9f784073b92931526cbf3dd6_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"100.0,-0.0\" dur=\" 0.535s\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"100.0,-0.0\" to=\"110.0,-0.0\" dur=\" 0.054s\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_5.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4d8ff9cc9f784073b92931526cbf3dd6_7\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-270.0,0,0\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_6.end\" dur=\" 0.167s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"110.0,-0.0\" to=\"-40.0,-1.8369701987210297e-14\" dur=\" 0.803s\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_7.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-40.0,-1.8369701987210297e-14\" to=\"-50.0,-1.9594348786357652e-14\" dur=\" 0.054s\" begin=\"af_4d8ff9cc9f784073b92931526cbf3dd6_8.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nwidth(20)\nforward(100)\nwidth(80)\nforward(20)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 6, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nwidth(20)\nforward(100)\nwidth(80)\nforward(10)\n\nwidth(20)\nleft(180)\nforward(150)\nwidth(80)\nforward(10)\n\ndone()", - "execution_count": 6, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_cff5d88253ba4ea69e4146d8715d8f51_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_cff5d88253ba4ea69e4146d8715d8f51_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 20\"><animate id=\"af_cff5d88253ba4ea69e4146d8715d8f51_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"100\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_4.end\" from=\"0\" to=\"0\" dur=\" 0.535s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_4.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.535s\" fill=\"freeze\"></set></line><line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"0\" style=\"stroke: black;stroke-width: 80\"><animate id=\"af_cff5d88253ba4ea69e4146d8715d8f51_6\" attributename=\"x2\" attributetype=\"XML\" from=\"100\" to=\"110\" dur=\" 0.054s\" fill=\"freeze\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_5.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_5.end\" from=\"0\" to=\"0\" dur=\" 0.054s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_5.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.054s\" fill=\"freeze\"></set></line><line x1=\"110\" y1=\"0\" x2=\"110\" y2=\"0\" style=\"stroke: black;stroke-width: 20\"><animate id=\"af_cff5d88253ba4ea69e4146d8715d8f51_8\" attributename=\"x2\" attributetype=\"XML\" from=\"110\" to=\"-40\" dur=\" 0.803s\" fill=\"freeze\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_7.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_7.end\" from=\"0\" to=\"-1.8369701987210297e-14\" dur=\" 0.803s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_7.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.803s\" fill=\"freeze\"></set></line><line x1=\"-40\" y1=\"-1.8369701987210297e-14\" x2=\"-40\" y2=\"-1.8369701987210297e-14\" style=\"stroke: black;stroke-width: 80\"><animate id=\"af_cff5d88253ba4ea69e4146d8715d8f51_9\" attributename=\"x2\" attributetype=\"XML\" from=\"-40\" to=\"-50\" dur=\" 0.054s\" fill=\"freeze\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_8.end\" from=\"-1.8369701987210297e-14\" to=\"-1.9594348786357652e-14\" dur=\" 0.054s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_8.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.054s\" fill=\"freeze\"></set></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_cff5d88253ba4ea69e4146d8715d8f51_1\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_cff5d88253ba4ea69e4146d8715d8f51_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_cff5d88253ba4ea69e4146d8715d8f51_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"100.0,-0.0\" dur=\" 0.535s\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"100.0,-0.0\" to=\"110.0,-0.0\" dur=\" 0.054s\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_5.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_cff5d88253ba4ea69e4146d8715d8f51_7\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-270.0,0,0\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_6.end\" dur=\" 0.167s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"110.0,-0.0\" to=\"-40.0,-1.8369701987210297e-14\" dur=\" 0.803s\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_7.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-40.0,-1.8369701987210297e-14\" to=\"-50.0,-1.9594348786357652e-14\" dur=\" 0.054s\" begin=\"af_cff5d88253ba4ea69e4146d8715d8f51_8.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nwidth(20)\nforward(100)\nwidth(80)\nforward(10)\n\nwidth(20)\nleft(180)\nforward(150)\nwidth(80)\nforward(10)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 1.7 Lunettes de soleil\n\nVoici encore un exemple où, avec un simple changement d'épaisseur, vous obtenez un effet très intéressant.\n\n### Exercise 7\nAjoutez la première branche qui manque." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nwidth(50)\nforward(20)\nwidth(10)\nforward(60)\nwidth(50)\nforward(20)\nwidth(10)\nforward(40)\nleft(45)\nforward(60)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nwidth(50)\nforward(20)\nwidth(10)\nforward(60)\nwidth(50)\nforward(20)\nwidth(10)\nforward(40)\nleft(45)\nforward(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 8, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nwidth(50)\nforward(20)\nwidth(10)\nforward(60)\nwidth(50)\nforward(20)\nwidth(10)\nforward(40)\nleft(45)\nforward(60)\n\nleft(180)\nforward(60)\nright(45)\nforward(180)\nright(135)\nforward(60)\n\ndone()", - "execution_count": 8, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_9351f3f7c91b4457b9e87a1a7803973a_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_9351f3f7c91b4457b9e87a1a7803973a_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 50\"><animate id=\"af_9351f3f7c91b4457b9e87a1a7803973a_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"20\" dur=\" 0.107s\" fill=\"freeze\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_4.end\" from=\"0\" to=\"0\" dur=\" 0.107s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_4.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.107s\" fill=\"freeze\"></set></line><line x1=\"20\" y1=\"0\" x2=\"20\" y2=\"0\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_9351f3f7c91b4457b9e87a1a7803973a_6\" attributename=\"x2\" attributetype=\"XML\" from=\"20\" to=\"80\" dur=\" 0.321s\" fill=\"freeze\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_5.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_5.end\" from=\"0\" to=\"0\" dur=\" 0.321s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_5.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.321s\" fill=\"freeze\"></set></line><line x1=\"80\" y1=\"0\" x2=\"80\" y2=\"0\" style=\"stroke: black;stroke-width: 50\"><animate id=\"af_9351f3f7c91b4457b9e87a1a7803973a_7\" attributename=\"x2\" attributetype=\"XML\" from=\"80\" to=\"100\" dur=\" 0.107s\" fill=\"freeze\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_6.end\" from=\"0\" to=\"0\" dur=\" 0.107s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_6.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.107s\" fill=\"freeze\"></set></line><line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"0\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_9351f3f7c91b4457b9e87a1a7803973a_8\" attributename=\"x2\" attributetype=\"XML\" from=\"100\" to=\"140\" dur=\" 0.214s\" fill=\"freeze\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_7.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_7.end\" from=\"0\" to=\"0\" dur=\" 0.214s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_7.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.214s\" fill=\"freeze\"></set></line><line x1=\"140\" y1=\"0\" x2=\"140\" y2=\"0\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_9351f3f7c91b4457b9e87a1a7803973a_10\" attributename=\"x2\" attributetype=\"XML\" from=\"140\" to=\"182.42640687119285\" dur=\" 0.321s\" fill=\"freeze\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_9.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_9.end\" from=\"0\" to=\"-42.426406871192846\" dur=\" 0.321s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_9.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.321s\" fill=\"freeze\"></set></line><line x1=\"182.42640687119285\" y1=\"-42.426406871192846\" x2=\"182.42640687119285\" y2=\"-42.426406871192846\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_9351f3f7c91b4457b9e87a1a7803973a_12\" attributename=\"x2\" attributetype=\"XML\" from=\"182.42640687119285\" to=\"140\" dur=\" 0.321s\" fill=\"freeze\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_11.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_11.end\" from=\"-42.426406871192846\" to=\"0\" dur=\" 0.321s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_11.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.321s\" fill=\"freeze\"></set></line><line x1=\"140\" y1=\"0\" x2=\"140\" y2=\"0\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_9351f3f7c91b4457b9e87a1a7803973a_14\" attributename=\"x2\" attributetype=\"XML\" from=\"140\" to=\"-40\" dur=\" 0.963s\" fill=\"freeze\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_13.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_13.end\" from=\"0\" to=\"-2.2043642384652358e-14\" dur=\" 0.963s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_13.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.963s\" fill=\"freeze\"></set></line><line x1=\"-40\" y1=\"-2.2043642384652358e-14\" x2=\"-40\" y2=\"-2.2043642384652358e-14\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_9351f3f7c91b4457b9e87a1a7803973a_16\" attributename=\"x2\" attributetype=\"XML\" from=\"-40\" to=\"2.426406871192853\" dur=\" 0.321s\" fill=\"freeze\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_15.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_15.end\" from=\"-2.2043642384652358e-14\" to=\"-42.42640687119287\" dur=\" 0.321s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_15.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.321s\" fill=\"freeze\"></set></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_9351f3f7c91b4457b9e87a1a7803973a_1\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_9351f3f7c91b4457b9e87a1a7803973a_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_9351f3f7c91b4457b9e87a1a7803973a_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"20.0,-0.0\" dur=\" 0.107s\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"20.0,-0.0\" to=\"80.0,-0.0\" dur=\" 0.321s\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_5.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"80.0,-0.0\" to=\"100.0,-0.0\" dur=\" 0.107s\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"100.0,-0.0\" to=\"140.0,-0.0\" dur=\" 0.214s\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_7.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_9351f3f7c91b4457b9e87a1a7803973a_9\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-135.0,0,0\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_8.end\" dur=\" 0.042s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"140.0,-0.0\" to=\"182.42640687119285,-42.426406871192846\" dur=\" 0.321s\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_9.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_9351f3f7c91b4457b9e87a1a7803973a_11\" type=\"rotate\" from=\"-135.0,0,0\" to=\"-315.0,0,0\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_10.end\" dur=\" 0.167s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"182.42640687119285,-42.426406871192846\" to=\"140.0,-0.0\" dur=\" 0.321s\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_11.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_12.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_9351f3f7c91b4457b9e87a1a7803973a_13\" type=\"rotate\" from=\"-315.0,0,0\" to=\"-270.0,0,0\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_12.end\" dur=\" 0.042s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_13.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"140.0,-0.0\" to=\"-40.0,-2.2043642384652358e-14\" dur=\" 0.963s\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_13.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_14.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_9351f3f7c91b4457b9e87a1a7803973a_15\" type=\"rotate\" from=\"-270.0,0,0\" to=\"-135.0,0,0\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_14.end\" dur=\" 0.125s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_15.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-40.0,-2.2043642384652358e-14\" to=\"2.426406871192853,-42.42640687119287\" dur=\" 0.321s\" begin=\"af_9351f3f7c91b4457b9e87a1a7803973a_15.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nwidth(50)\nforward(20)\nwidth(10)\nforward(60)\nwidth(50)\nforward(20)\nwidth(10)\nforward(40)\nleft(45)\nforward(60)\n\nleft(180)\nforward(60)\nright(45)\nforward(180)\nright(135)\nforward(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 1.8 Commentaire\n\nLe symbole `#` indique un commentaire. Sur PC vous pouvez l'insérer avec **Alt Gr+3** ou **opt+3** sur Mac.\nUn commentaire permet d'ajouter une explication pour le lecteur humain. Il n'a aucune influence sur le programme. Python ignore tout simplement tout commentaire.\n\n## Exercise 8\nExpliquez dans chaque ligne ce que fait l'instruction." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nwidth(50) # mettre l'épaisseur du trait à 50\nforward(20) # avancer de 20 pas\nwidth(10)\nforward(60)\nwidth(50)\nforward(20)\nwidth(10)\nforward(40)\nleft(45)\nforward(60)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nwidth(50) # mettre l'épaisseur du trait à 50\nforward(20) # avancer de 20 pas\nwidth(10)\nforward(60)\nwidth(50)\nforward(20)\nwidth(10)\nforward(40)\nleft(45)\nforward(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 8, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nwidth(50) # mettre l'épaisseur du trait à 50\nforward(20) # avancer de 20 pas\nwidth(10) # mettre l'épaisseur du trait à 10\nforward(60) # avancer de 60 pas\nwidth(50) # mettre l'épaisseur du trait à 50\nforward(20) # avancer de 20 pas\nwidth(10) # mettre l'épaisseur du trait à 10\nforward(40) # avancer de 40 pas\nleft(45) # tourner à gauche de 45°\nforward(60) # avancer de 60 pas\n\ndone()", - "execution_count": 8, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_108d3b9099394d5f93771643096b3540_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_108d3b9099394d5f93771643096b3540_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_108d3b9099394d5f93771643096b3540_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_108d3b9099394d5f93771643096b3540_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 50\"><animate id=\"af_108d3b9099394d5f93771643096b3540_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"20\" dur=\" 0.107s\" fill=\"freeze\" begin=\"af_108d3b9099394d5f93771643096b3540_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_108d3b9099394d5f93771643096b3540_4.end\" from=\"0\" to=\"0\" dur=\" 0.107s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_108d3b9099394d5f93771643096b3540_4.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.107s\" fill=\"freeze\"></set></line><line x1=\"20\" y1=\"0\" x2=\"20\" y2=\"0\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_108d3b9099394d5f93771643096b3540_6\" attributename=\"x2\" attributetype=\"XML\" from=\"20\" to=\"80\" dur=\" 0.321s\" fill=\"freeze\" begin=\"af_108d3b9099394d5f93771643096b3540_5.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_108d3b9099394d5f93771643096b3540_5.end\" from=\"0\" to=\"0\" dur=\" 0.321s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_108d3b9099394d5f93771643096b3540_5.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.321s\" fill=\"freeze\"></set></line><line x1=\"80\" y1=\"0\" x2=\"80\" y2=\"0\" style=\"stroke: black;stroke-width: 50\"><animate id=\"af_108d3b9099394d5f93771643096b3540_7\" attributename=\"x2\" attributetype=\"XML\" from=\"80\" to=\"100\" dur=\" 0.107s\" fill=\"freeze\" begin=\"af_108d3b9099394d5f93771643096b3540_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_108d3b9099394d5f93771643096b3540_6.end\" from=\"0\" to=\"0\" dur=\" 0.107s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_108d3b9099394d5f93771643096b3540_6.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.107s\" fill=\"freeze\"></set></line><line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"0\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_108d3b9099394d5f93771643096b3540_8\" attributename=\"x2\" attributetype=\"XML\" from=\"100\" to=\"140\" dur=\" 0.214s\" fill=\"freeze\" begin=\"af_108d3b9099394d5f93771643096b3540_7.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_108d3b9099394d5f93771643096b3540_7.end\" from=\"0\" to=\"0\" dur=\" 0.214s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_108d3b9099394d5f93771643096b3540_7.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.214s\" fill=\"freeze\"></set></line><line x1=\"140\" y1=\"0\" x2=\"140\" y2=\"0\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_108d3b9099394d5f93771643096b3540_10\" attributename=\"x2\" attributetype=\"XML\" from=\"140\" to=\"182.42640687119285\" dur=\" 0.321s\" fill=\"freeze\" begin=\"af_108d3b9099394d5f93771643096b3540_9.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_108d3b9099394d5f93771643096b3540_9.end\" from=\"0\" to=\"-42.426406871192846\" dur=\" 0.321s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_108d3b9099394d5f93771643096b3540_9.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.321s\" fill=\"freeze\"></set></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_108d3b9099394d5f93771643096b3540_1\" begin=\"af_108d3b9099394d5f93771643096b3540_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_108d3b9099394d5f93771643096b3540_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_108d3b9099394d5f93771643096b3540_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_108d3b9099394d5f93771643096b3540_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_108d3b9099394d5f93771643096b3540_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_108d3b9099394d5f93771643096b3540_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_108d3b9099394d5f93771643096b3540_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_108d3b9099394d5f93771643096b3540_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"20.0,-0.0\" dur=\" 0.107s\" begin=\"af_108d3b9099394d5f93771643096b3540_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_108d3b9099394d5f93771643096b3540_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"20.0,-0.0\" to=\"80.0,-0.0\" dur=\" 0.321s\" begin=\"af_108d3b9099394d5f93771643096b3540_5.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_108d3b9099394d5f93771643096b3540_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"80.0,-0.0\" to=\"100.0,-0.0\" dur=\" 0.107s\" begin=\"af_108d3b9099394d5f93771643096b3540_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_108d3b9099394d5f93771643096b3540_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"100.0,-0.0\" to=\"140.0,-0.0\" dur=\" 0.214s\" begin=\"af_108d3b9099394d5f93771643096b3540_7.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_108d3b9099394d5f93771643096b3540_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_108d3b9099394d5f93771643096b3540_9\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-135.0,0,0\" begin=\"af_108d3b9099394d5f93771643096b3540_8.end\" dur=\" 0.042s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_108d3b9099394d5f93771643096b3540_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"140.0,-0.0\" to=\"182.42640687119285,-42.426406871192846\" dur=\" 0.321s\" begin=\"af_108d3b9099394d5f93771643096b3540_9.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nwidth(50) # mettre l'épaisseur du trait à 50\nforward(20) # avancer de 20 pas\nwidth(10) # mettre l'épaisseur du trait à 10\nforward(60) # avancer de 60 pas\nwidth(50) # mettre l'épaisseur du trait à 50\nforward(20) # avancer de 20 pas\nwidth(10) # mettre l'épaisseur du trait à 10\nforward(40) # avancer de 40 pas\nleft(45) # tourner à gauche de 45°\nforward(60) # avancer de 60 pas\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### À retenir\nL'exercice précédent servait à expliciter pour un débutant en programmation la signification des commandes écrites en anglais. Normalement on ne fait pas ça, car un programmeur est censé connaitre la signification des commandes.\n\nLes commentaires servent à expliciter la vraie signification d'une partie du programme.\n\n## Exercise 9\nExpliquez cette fois ce que dessine chaque partie du programme (verre, pont, verre, charnière, branche)." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\n# dessiner le premier verre\nwidth(50) \nforward(20)\n\n# dessiner le pont (nez)\nwidth(10) \nforward(60)\nwidth(50)\nforward(20)\nwidth(10)\nforward(40)\nleft(45)\nforward(60)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\n# dessiner le premier verre\nwidth(50) \nforward(20)\n\n# dessiner le pont (nez)\nwidth(10) \nforward(60)\nwidth(50)\nforward(20)\nwidth(10)\nforward(40)\nleft(45)\nforward(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 9, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\n# dessiner le premier verre\nwidth(50) \nforward(20)\n\n# dessiner le pont (nez)\nwidth(10) \nforward(60)\n\n# dessiner le second verre\nwidth(50)\nforward(20)\n\n# dessiner la monture\nwidth(10)\nforward(40)\n\n# dessiner la branche\nleft(45)\nforward(60)\n\ndone()", - "execution_count": 9, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_12f7efe309bf4a0da05691dc2192f09e_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_12f7efe309bf4a0da05691dc2192f09e_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 50\"><animate id=\"af_12f7efe309bf4a0da05691dc2192f09e_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"20\" dur=\" 0.107s\" fill=\"freeze\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_4.end\" from=\"0\" to=\"0\" dur=\" 0.107s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_4.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.107s\" fill=\"freeze\"></set></line><line x1=\"20\" y1=\"0\" x2=\"20\" y2=\"0\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_12f7efe309bf4a0da05691dc2192f09e_6\" attributename=\"x2\" attributetype=\"XML\" from=\"20\" to=\"80\" dur=\" 0.321s\" fill=\"freeze\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_5.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_5.end\" from=\"0\" to=\"0\" dur=\" 0.321s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_5.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.321s\" fill=\"freeze\"></set></line><line x1=\"80\" y1=\"0\" x2=\"80\" y2=\"0\" style=\"stroke: black;stroke-width: 50\"><animate id=\"af_12f7efe309bf4a0da05691dc2192f09e_7\" attributename=\"x2\" attributetype=\"XML\" from=\"80\" to=\"100\" dur=\" 0.107s\" fill=\"freeze\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_6.end\" from=\"0\" to=\"0\" dur=\" 0.107s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_6.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.107s\" fill=\"freeze\"></set></line><line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"0\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_12f7efe309bf4a0da05691dc2192f09e_8\" attributename=\"x2\" attributetype=\"XML\" from=\"100\" to=\"140\" dur=\" 0.214s\" fill=\"freeze\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_7.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_7.end\" from=\"0\" to=\"0\" dur=\" 0.214s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_7.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.214s\" fill=\"freeze\"></set></line><line x1=\"140\" y1=\"0\" x2=\"140\" y2=\"0\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_12f7efe309bf4a0da05691dc2192f09e_10\" attributename=\"x2\" attributetype=\"XML\" from=\"140\" to=\"182.42640687119285\" dur=\" 0.321s\" fill=\"freeze\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_9.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_9.end\" from=\"0\" to=\"-42.426406871192846\" dur=\" 0.321s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_9.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.321s\" fill=\"freeze\"></set></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_12f7efe309bf4a0da05691dc2192f09e_1\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_12f7efe309bf4a0da05691dc2192f09e_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_12f7efe309bf4a0da05691dc2192f09e_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_12f7efe309bf4a0da05691dc2192f09e_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_12f7efe309bf4a0da05691dc2192f09e_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_12f7efe309bf4a0da05691dc2192f09e_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"20.0,-0.0\" dur=\" 0.107s\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_12f7efe309bf4a0da05691dc2192f09e_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"20.0,-0.0\" to=\"80.0,-0.0\" dur=\" 0.321s\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_5.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_12f7efe309bf4a0da05691dc2192f09e_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"80.0,-0.0\" to=\"100.0,-0.0\" dur=\" 0.107s\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_12f7efe309bf4a0da05691dc2192f09e_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"100.0,-0.0\" to=\"140.0,-0.0\" dur=\" 0.214s\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_7.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_12f7efe309bf4a0da05691dc2192f09e_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_12f7efe309bf4a0da05691dc2192f09e_9\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-135.0,0,0\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_8.end\" dur=\" 0.042s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_12f7efe309bf4a0da05691dc2192f09e_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"140.0,-0.0\" to=\"182.42640687119285,-42.426406871192846\" dur=\" 0.321s\" begin=\"af_12f7efe309bf4a0da05691dc2192f09e_9.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\n# dessiner le premier verre\nwidth(50) \nforward(20)\n\n# dessiner le pont (nez)\nwidth(10) \nforward(60)\n\n# dessiner le second verre\nwidth(50)\nforward(20)\n\n# dessiner la monture\nwidth(10)\nforward(40)\n\n# dessiner la branche\nleft(45)\nforward(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 1.9 Équivalence\n\nLa tortue possède 4 fonctions de déplacement, mais à strictement parler, on pourrait s'en sortir avec seulement deux fonctions, `forward()` et `left()`, car :\n\n- `backward(d)` est équivalent à `forward(-d)`\n- `right(a)` est équivalent à `left(-a)`\n\nDans le programme ci-dessous, les 4 lignes du deuxième bloc sont équivalentes aux 4 instructions du premier bloc et donnent un résultat identique.\n\n### Exercice 10\nExpliquez avec un commentaire ce que font les 2 dernières instructions avant le `done()`.\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(160)\nleft(90)\nforward(100)\nleft(90)\n\nbackward(-160) # équivalent à forward(160)\nright(-90) # équivalent à left(90)\nbackward(-100)\nright(-90)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(160)\nleft(90)\nforward(100)\nleft(90)\n\nbackward(-160) # équivalent à forward(160)\nright(-90) # équivalent à left(90)\nbackward(-100)\nright(-90)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 10, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(160)\nleft(90)\nforward(100)\nleft(90)\n\nbackward(-160) # équivalent à forward(160)\nright(-90) # équivalent à left(90)\nbackward(-100) # avance de 100\nright(-90) # trouner à gauche de 90° \n\ndone()", - "execution_count": 10, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_5099363d2ddf4a99bd42699060f62c0d_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_5099363d2ddf4a99bd42699060f62c0d_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_5099363d2ddf4a99bd42699060f62c0d_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"160\" dur=\" 0.856s\" fill=\"freeze\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_4.end\" from=\"0\" to=\"0\" dur=\" 0.856s\" fill=\"freeze\"></animate></line><line x1=\"160\" y1=\"0\" x2=\"160\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_5099363d2ddf4a99bd42699060f62c0d_7\" attributename=\"x2\" attributetype=\"XML\" from=\"160\" to=\"160\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_6.end\" from=\"0\" to=\"-100\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"160\" y1=\"-100\" x2=\"160\" y2=\"-100\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_5099363d2ddf4a99bd42699060f62c0d_9\" attributename=\"x2\" attributetype=\"XML\" from=\"160\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_8.end\" from=\"-100\" to=\"-100.00000000000001\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"-100.00000000000001\" x2=\"0\" y2=\"-100.00000000000001\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_5099363d2ddf4a99bd42699060f62c0d_11\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"-1.8369701987210297e-14\" dur=\"1ms\" fill=\"freeze\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_10.end\" from=\"-100.00000000000001\" to=\"-1.4210854715202004e-14\" dur=\"1ms\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_5099363d2ddf4a99bd42699060f62c0d_1\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_5099363d2ddf4a99bd42699060f62c0d_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_5099363d2ddf4a99bd42699060f62c0d_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_5099363d2ddf4a99bd42699060f62c0d_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_5099363d2ddf4a99bd42699060f62c0d_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_5099363d2ddf4a99bd42699060f62c0d_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"160.0,-0.0\" dur=\" 0.856s\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_5099363d2ddf4a99bd42699060f62c0d_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_5099363d2ddf4a99bd42699060f62c0d_6\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-180.0,0,0\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_5.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_5099363d2ddf4a99bd42699060f62c0d_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"160.0,-0.0\" to=\"160.0,-100.0\" dur=\" 0.535s\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_5099363d2ddf4a99bd42699060f62c0d_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_5099363d2ddf4a99bd42699060f62c0d_8\" type=\"rotate\" from=\"-180.0,0,0\" to=\"-270.0,0,0\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_7.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_5099363d2ddf4a99bd42699060f62c0d_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"160.0,-100.0\" to=\"0.0,-100.00000000000001\" dur=\"1ms\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_8.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_5099363d2ddf4a99bd42699060f62c0d_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_5099363d2ddf4a99bd42699060f62c0d_10\" type=\"rotate\" from=\"-270.0,0,0\" to=\"-360.0,0,0\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_9.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_5099363d2ddf4a99bd42699060f62c0d_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-100.00000000000001\" to=\"-1.8369701987210297e-14,-1.4210854715202004e-14\" dur=\"1ms\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_10.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_5099363d2ddf4a99bd42699060f62c0d_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_5099363d2ddf4a99bd42699060f62c0d_12\" type=\"rotate\" from=\"-360.0,0,0\" to=\"-450.0,0,0\" begin=\"af_5099363d2ddf4a99bd42699060f62c0d_11.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nforward(160)\nleft(90)\nforward(100)\nleft(90)\n\nbackward(-160) # équivalent à forward(160)\nright(-90) # équivalent à left(90)\nbackward(-100) # avance de 100\nright(-90) # trouner à gauche de 90° \n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Exercices d'entraînement " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 11\nÉcrivez un programme qui dessine un losange conformément au croquis ci-dessous.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\n# à compléter...\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\n# à compléter...\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 10, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nleft(30)\nforward(100)\nleft(120)\nforward(100)\nleft(60)\nforward(100)\nleft(120)\nforward(100)\n\ndone()", - "execution_count": 10, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_2497ff5d1f424cd9af20555918ae96cb_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_2497ff5d1f424cd9af20555918ae96cb_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_2497ff5d1f424cd9af20555918ae96cb_6\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"86.60254037844388\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_5.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_5.end\" from=\"0\" to=\"-49.99999999999999\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"86.60254037844388\" y1=\"-49.99999999999999\" x2=\"86.60254037844388\" y2=\"-49.99999999999999\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_2497ff5d1f424cd9af20555918ae96cb_8\" attributename=\"x2\" attributetype=\"XML\" from=\"86.60254037844388\" to=\"0\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_7.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_7.end\" from=\"-49.99999999999999\" to=\"-99.99999999999999\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"-99.99999999999999\" x2=\"0\" y2=\"-99.99999999999999\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_2497ff5d1f424cd9af20555918ae96cb_10\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"-86.60254037844386\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_9.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_9.end\" from=\"-99.99999999999999\" to=\"-49.99999999999997\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"-86.60254037844386\" y1=\"-49.99999999999997\" x2=\"-86.60254037844386\" y2=\"-49.99999999999997\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_2497ff5d1f424cd9af20555918ae96cb_12\" attributename=\"x2\" attributetype=\"XML\" from=\"-86.60254037844386\" to=\"-2.842170943040401e-14\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_11.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_11.end\" from=\"-49.99999999999997\" to=\"7.105427357601002e-14\" dur=\" 0.535s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_2497ff5d1f424cd9af20555918ae96cb_1\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_2497ff5d1f424cd9af20555918ae96cb_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_2497ff5d1f424cd9af20555918ae96cb_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_2497ff5d1f424cd9af20555918ae96cb_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_2497ff5d1f424cd9af20555918ae96cb_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_2497ff5d1f424cd9af20555918ae96cb_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_2497ff5d1f424cd9af20555918ae96cb_5\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-120.0,0,0\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_4.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_2497ff5d1f424cd9af20555918ae96cb_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"86.60254037844388,-49.99999999999999\" dur=\" 0.535s\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_5.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_2497ff5d1f424cd9af20555918ae96cb_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_2497ff5d1f424cd9af20555918ae96cb_7\" type=\"rotate\" from=\"-120.0,0,0\" to=\"-240.0,0,0\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_6.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_2497ff5d1f424cd9af20555918ae96cb_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"86.60254037844388,-49.99999999999999\" to=\"0.0,-99.99999999999999\" dur=\" 0.535s\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_7.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_2497ff5d1f424cd9af20555918ae96cb_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_2497ff5d1f424cd9af20555918ae96cb_9\" type=\"rotate\" from=\"-240.0,0,0\" to=\"-300.0,0,0\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_8.end\" dur=\" 0.056s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_2497ff5d1f424cd9af20555918ae96cb_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-99.99999999999999\" to=\"-86.60254037844386,-49.99999999999997\" dur=\" 0.535s\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_9.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_2497ff5d1f424cd9af20555918ae96cb_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_2497ff5d1f424cd9af20555918ae96cb_11\" type=\"rotate\" from=\"-300.0,0,0\" to=\"-420.0,0,0\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_10.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_2497ff5d1f424cd9af20555918ae96cb_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-86.60254037844386,-49.99999999999997\" to=\"-2.842170943040401e-14,7.105427357601002e-14\" dur=\" 0.535s\" begin=\"af_2497ff5d1f424cd9af20555918ae96cb_11.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nleft(30)\nforward(100)\nleft(120)\nforward(100)\nleft(60)\nforward(100)\nleft(120)\nforward(100)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 12\nDessinez un hexagone régulier dont la longueur des côtés vaut 100 (voir la figure ci-dessous)." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<img src=\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiID8+CjxzdmcgYmFzZVByb2ZpbGU9ImZ1bGwiIGhlaWdodD0iMzAwcHgiIHZlcnNpb249IjEuMSIgd2lkdGg9IjMwMHB4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOmV2PSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL3htbC1ldmVudHMiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZGVmcyAvPjxwb2x5bGluZSBjbGlwLXBhdGg9InVybCgjYm9yZGVyX2NsaXApIiBmaWxsPSJub25lIiBwb2ludHM9IjEwMC41LDIwMC41IDIwMC41LDIwMC41IDI1MC41LDExMy44OTc0NTk2MjE1NTYxNCAyMDAuNTAwMDAwMDAwMDAwMDMsMjcuMjk0OTE5MjQzMTEyMjYgMTAwLjUwMDAwMDAwMDAwMDAzLDI3LjI5NDkxOTI0MzExMjIyIDUwLjUsMTEzLjg5NzQ1OTYyMTU1NjA1IDEwMC40OTk5OTk5OTk5OTk5NCwyMDAuNDk5OTk5OTk5OTk5OTQiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxIiAvPjwvc3ZnPg==\" />" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class=\"alert alert-block alert-info\"> \n <b> Indication</b>\n <br>\nPour tracer un hexagone, la tortue doit tourner 6 fois. Comme un tour complet représente 360°, à chaque angle la tortue doit tourné de \\( \\frac{360}{6}=60 \\) degrés.\n </div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(100)\n\n# à compléter...\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(100)\n\n# à compléter...\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 11, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\n\ndone()", - "execution_count": 11, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_4c080673ca814380921d7b7120469488_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4c080673ca814380921d7b7120469488_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_4c080673ca814380921d7b7120469488_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4c080673ca814380921d7b7120469488_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4c080673ca814380921d7b7120469488_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"100\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_4c080673ca814380921d7b7120469488_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4c080673ca814380921d7b7120469488_4.end\" from=\"0\" to=\"0\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4c080673ca814380921d7b7120469488_7\" attributename=\"x2\" attributetype=\"XML\" from=\"100\" to=\"150\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_4c080673ca814380921d7b7120469488_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4c080673ca814380921d7b7120469488_6.end\" from=\"0\" to=\"-86.60254037844386\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"150\" y1=\"-86.60254037844386\" x2=\"150\" y2=\"-86.60254037844386\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4c080673ca814380921d7b7120469488_9\" attributename=\"x2\" attributetype=\"XML\" from=\"150\" to=\"100.00000000000003\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_4c080673ca814380921d7b7120469488_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4c080673ca814380921d7b7120469488_8.end\" from=\"-86.60254037844386\" to=\"-173.20508075688775\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"100.00000000000003\" y1=\"-173.20508075688775\" x2=\"100.00000000000003\" y2=\"-173.20508075688775\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4c080673ca814380921d7b7120469488_11\" attributename=\"x2\" attributetype=\"XML\" from=\"100.00000000000003\" to=\"2.842170943040401e-14\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_4c080673ca814380921d7b7120469488_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4c080673ca814380921d7b7120469488_10.end\" from=\"-173.20508075688775\" to=\"-173.20508075688775\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"2.842170943040401e-14\" y1=\"-173.20508075688775\" x2=\"2.842170943040401e-14\" y2=\"-173.20508075688775\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4c080673ca814380921d7b7120469488_13\" attributename=\"x2\" attributetype=\"XML\" from=\"2.842170943040401e-14\" to=\"-50.000000000000014\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_4c080673ca814380921d7b7120469488_12.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4c080673ca814380921d7b7120469488_12.end\" from=\"-173.20508075688775\" to=\"-86.6025403784439\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"-50.000000000000014\" y1=\"-86.6025403784439\" x2=\"-50.000000000000014\" y2=\"-86.6025403784439\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4c080673ca814380921d7b7120469488_15\" attributename=\"x2\" attributetype=\"XML\" from=\"-50.000000000000014\" to=\"0\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_4c080673ca814380921d7b7120469488_14.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4c080673ca814380921d7b7120469488_14.end\" from=\"-86.6025403784439\" to=\"-4.263256414560601e-14\" dur=\" 0.535s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_4c080673ca814380921d7b7120469488_1\" begin=\"af_4c080673ca814380921d7b7120469488_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_4c080673ca814380921d7b7120469488_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4c080673ca814380921d7b7120469488_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_4c080673ca814380921d7b7120469488_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4c080673ca814380921d7b7120469488_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4c080673ca814380921d7b7120469488_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_4c080673ca814380921d7b7120469488_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4c080673ca814380921d7b7120469488_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"100.0,-0.0\" dur=\" 0.535s\" begin=\"af_4c080673ca814380921d7b7120469488_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4c080673ca814380921d7b7120469488_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4c080673ca814380921d7b7120469488_6\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-150.0,0,0\" begin=\"af_4c080673ca814380921d7b7120469488_5.end\" dur=\" 0.056s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4c080673ca814380921d7b7120469488_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"100.0,-0.0\" to=\"150.0,-86.60254037844386\" dur=\" 0.535s\" begin=\"af_4c080673ca814380921d7b7120469488_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4c080673ca814380921d7b7120469488_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4c080673ca814380921d7b7120469488_8\" type=\"rotate\" from=\"-150.0,0,0\" to=\"-210.0,0,0\" begin=\"af_4c080673ca814380921d7b7120469488_7.end\" dur=\" 0.056s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4c080673ca814380921d7b7120469488_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"150.0,-86.60254037844386\" to=\"100.00000000000003,-173.20508075688775\" dur=\" 0.535s\" begin=\"af_4c080673ca814380921d7b7120469488_8.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4c080673ca814380921d7b7120469488_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4c080673ca814380921d7b7120469488_10\" type=\"rotate\" from=\"-210.0,0,0\" to=\"-270.0,0,0\" begin=\"af_4c080673ca814380921d7b7120469488_9.end\" dur=\" 0.056s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4c080673ca814380921d7b7120469488_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"100.00000000000003,-173.20508075688775\" to=\"2.842170943040401e-14,-173.20508075688775\" dur=\" 0.535s\" begin=\"af_4c080673ca814380921d7b7120469488_10.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4c080673ca814380921d7b7120469488_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4c080673ca814380921d7b7120469488_12\" type=\"rotate\" from=\"-270.0,0,0\" to=\"-330.0,0,0\" begin=\"af_4c080673ca814380921d7b7120469488_11.end\" dur=\" 0.056s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4c080673ca814380921d7b7120469488_12.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"2.842170943040401e-14,-173.20508075688775\" to=\"-50.000000000000014,-86.6025403784439\" dur=\" 0.535s\" begin=\"af_4c080673ca814380921d7b7120469488_12.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4c080673ca814380921d7b7120469488_13.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4c080673ca814380921d7b7120469488_14\" type=\"rotate\" from=\"-330.0,0,0\" to=\"-390.0,0,0\" begin=\"af_4c080673ca814380921d7b7120469488_13.end\" dur=\" 0.056s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4c080673ca814380921d7b7120469488_14.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-50.000000000000014,-86.6025403784439\" to=\"0.0,-4.263256414560601e-14\" dur=\" 0.535s\" begin=\"af_4c080673ca814380921d7b7120469488_14.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4c080673ca814380921d7b7120469488_15.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4c080673ca814380921d7b7120469488_16\" type=\"rotate\" from=\"-390.0,0,0\" to=\"-450.0,0,0\" begin=\"af_4c080673ca814380921d7b7120469488_15.end\" dur=\" 0.056s\" fill=\"freeze\"></animateTransform></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 13\nDessinez une chaise." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nleft(90)\nforward(100)\n\n# à compléter...\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nleft(90)\nforward(100)\n\n# à compléter...\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 12, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nleft(90)\nforward(100)\nbackward(200)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\n\ndone()", - "execution_count": 12, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_39de28ff610a4878a4d373b8bde6024a_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_39de28ff610a4878a4d373b8bde6024a_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_39de28ff610a4878a4d373b8bde6024a_6\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"6.123233995736766e-15\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_5.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_5.end\" from=\"0\" to=\"-100\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"6.123233995736766e-15\" y1=\"-100\" x2=\"6.123233995736766e-15\" y2=\"-100\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_39de28ff610a4878a4d373b8bde6024a_7\" attributename=\"x2\" attributetype=\"XML\" from=\"6.123233995736766e-15\" to=\"-6.123233995736766e-15\" dur=\" 1.070s\" fill=\"freeze\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_6.end\" from=\"-100\" to=\"100\" dur=\" 1.070s\" fill=\"freeze\"></animate></line><line x1=\"-6.123233995736766e-15\" y1=\"100\" x2=\"-6.123233995736766e-15\" y2=\"100\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_39de28ff610a4878a4d373b8bde6024a_8\" attributename=\"x2\" attributetype=\"XML\" from=\"-6.123233995736766e-15\" to=\"0\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_7.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_7.end\" from=\"100\" to=\"0\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_39de28ff610a4878a4d373b8bde6024a_10\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"-100\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_9.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_9.end\" from=\"0\" to=\"-1.2246467991473532e-14\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"-100\" y1=\"-1.2246467991473532e-14\" x2=\"-100\" y2=\"-1.2246467991473532e-14\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_39de28ff610a4878a4d373b8bde6024a_12\" attributename=\"x2\" attributetype=\"XML\" from=\"-100\" to=\"-100.00000000000001\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_11.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_11.end\" from=\"-1.2246467991473532e-14\" to=\"99.99999999999999\" dur=\" 0.535s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_39de28ff610a4878a4d373b8bde6024a_1\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_39de28ff610a4878a4d373b8bde6024a_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_39de28ff610a4878a4d373b8bde6024a_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_39de28ff610a4878a4d373b8bde6024a_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_39de28ff610a4878a4d373b8bde6024a_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_39de28ff610a4878a4d373b8bde6024a_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_39de28ff610a4878a4d373b8bde6024a_5\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-180.0,0,0\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_4.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_39de28ff610a4878a4d373b8bde6024a_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"6.123233995736766e-15,-100.0\" dur=\" 0.535s\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_5.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_39de28ff610a4878a4d373b8bde6024a_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"6.123233995736766e-15,-100.0\" to=\"-6.123233995736766e-15,100.0\" dur=\" 1.070s\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_39de28ff610a4878a4d373b8bde6024a_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-6.123233995736766e-15,100.0\" to=\"0.0,-0.0\" dur=\" 0.535s\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_7.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_39de28ff610a4878a4d373b8bde6024a_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_39de28ff610a4878a4d373b8bde6024a_9\" type=\"rotate\" from=\"-180.0,0,0\" to=\"-270.0,0,0\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_8.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_39de28ff610a4878a4d373b8bde6024a_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"-100.0,-1.2246467991473532e-14\" dur=\" 0.535s\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_9.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_39de28ff610a4878a4d373b8bde6024a_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_39de28ff610a4878a4d373b8bde6024a_11\" type=\"rotate\" from=\"-270.0,0,0\" to=\"-360.0,0,0\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_10.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_39de28ff610a4878a4d373b8bde6024a_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-100.0,-1.2246467991473532e-14\" to=\"-100.00000000000001,99.99999999999999\" dur=\" 0.535s\" begin=\"af_39de28ff610a4878a4d373b8bde6024a_11.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nleft(90)\nforward(100)\nbackward(200)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 14\nCommenter le programme ci-dessous afin d'expliquer le but des différents blocs du code." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\n# mettre votre commentaire\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(200)\nleft(90)\nforward(100)\nleft(90)\n\n# mettre votre commentaire\nforward(30)\n\n# mettre votre commentaire\nforward(30)\nleft(90)\nforward(50)\nleft(90)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\n# mettre votre commentaire\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(200)\nleft(90)\nforward(100)\nleft(90)\n\n# mettre votre commentaire\nforward(30)\n\n# mettre votre commentaire\nforward(30)\nleft(90)\nforward(50)\nleft(90)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\n# dessiner la base de la maison\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(200)\nleft(90)\nforward(100)\nleft(90)\n\n# avancer à la base de la porte\nforward(30)\n\n# dessiner la porte\nforward(30)\nleft(90)\nforward(50)\nleft(90)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\n# dessiner la base de la maison\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(200)\nleft(90)\nforward(100)\nleft(90)\n\n# avancer à la base de la porte\nforward(30)\n\n# dessiner la porte\nforward(30)\nleft(90)\nforward(50)\nleft(90)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 15 *\nÉcrivez un programme qui dessine une maison comme dans le schéma ci-dessous. Elle est formée de plusieurs triangles isocèles rectangles. La longueur des côtés du carré de base est de 185.\n\n\n\n*Exercice tiré du livre **L'informatique simplement** de J. Hromkovic et T. Kohn*" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class=\"alert alert-block alert-info\"> \n <b> Indication</b>\n <br>\npour connaître la longueur du toit et des diagonles, utilisez le théorème de Pythagore.\n </div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(185)\nleft(90)\n\n# à compléter...\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(185)\nleft(90)\n\n# à compléter...\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 15, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(185)\nleft(90)\nforward(185)\nleft(90)\nforward(185)\nleft(90)\nforward(185)\nleft(135)\nforward(262)\nleft(90)\nforward(131)\nleft(90)\nforward(131)\nleft(90)\nforward(262)\n\ndone()", - "execution_count": 15, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_4fbda006711249eeaa1a111f60cdfa24_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4fbda006711249eeaa1a111f60cdfa24_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4fbda006711249eeaa1a111f60cdfa24_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"185\" dur=\" 0.990s\" fill=\"freeze\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_4.end\" from=\"0\" to=\"0\" dur=\" 0.990s\" fill=\"freeze\"></animate></line><line x1=\"185\" y1=\"0\" x2=\"185\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4fbda006711249eeaa1a111f60cdfa24_7\" attributename=\"x2\" attributetype=\"XML\" from=\"185\" to=\"185\" dur=\" 0.990s\" fill=\"freeze\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_6.end\" from=\"0\" to=\"-185\" dur=\" 0.990s\" fill=\"freeze\"></animate></line><line x1=\"185\" y1=\"-185\" x2=\"185\" y2=\"-185\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4fbda006711249eeaa1a111f60cdfa24_9\" attributename=\"x2\" attributetype=\"XML\" from=\"185\" to=\"0\" dur=\" 0.990s\" fill=\"freeze\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_8.end\" from=\"-185\" to=\"-185.00000000000003\" dur=\" 0.990s\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"-185.00000000000003\" x2=\"0\" y2=\"-185.00000000000003\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4fbda006711249eeaa1a111f60cdfa24_11\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"-3.398394867633905e-14\" dur=\" 0.990s\" fill=\"freeze\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_10.end\" from=\"-185.00000000000003\" to=\"-2.842170943040401e-14\" dur=\" 0.990s\" fill=\"freeze\"></animate></line><line x1=\"-3.398394867633905e-14\" y1=\"-2.842170943040401e-14\" x2=\"-3.398394867633905e-14\" y2=\"-2.842170943040401e-14\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4fbda006711249eeaa1a111f60cdfa24_13\" attributename=\"x2\" attributetype=\"XML\" from=\"-3.398394867633905e-14\" to=\"185.26197667087547\" dur=\" 1.402s\" fill=\"freeze\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_12.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_12.end\" from=\"-2.842170943040401e-14\" to=\"-185.26197667087544\" dur=\" 1.402s\" fill=\"freeze\"></animate></line><line x1=\"185.26197667087547\" y1=\"-185.26197667087544\" x2=\"185.26197667087547\" y2=\"-185.26197667087544\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4fbda006711249eeaa1a111f60cdfa24_15\" attributename=\"x2\" attributetype=\"XML\" from=\"185.26197667087547\" to=\"92.63098833543769\" dur=\" 0.701s\" fill=\"freeze\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_14.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_14.end\" from=\"-185.26197667087544\" to=\"-277.89296500631315\" dur=\" 0.701s\" fill=\"freeze\"></animate></line><line x1=\"92.63098833543769\" y1=\"-277.89296500631315\" x2=\"92.63098833543769\" y2=\"-277.89296500631315\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4fbda006711249eeaa1a111f60cdfa24_17\" attributename=\"x2\" attributetype=\"XML\" from=\"92.63098833543769\" to=\"1.4210854715202004e-14\" dur=\" 0.701s\" fill=\"freeze\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_16.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_16.end\" from=\"-277.89296500631315\" to=\"-185.26197667087536\" dur=\" 0.701s\" fill=\"freeze\"></animate></line><line x1=\"1.4210854715202004e-14\" y1=\"-185.26197667087536\" x2=\"1.4210854715202004e-14\" y2=\"-185.26197667087536\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4fbda006711249eeaa1a111f60cdfa24_19\" attributename=\"x2\" attributetype=\"XML\" from=\"1.4210854715202004e-14\" to=\"185.26197667087553\" dur=\" 1.402s\" fill=\"freeze\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_18.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_18.end\" from=\"-185.26197667087536\" to=\"2.842170943040401e-14\" dur=\" 1.402s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_4fbda006711249eeaa1a111f60cdfa24_1\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4fbda006711249eeaa1a111f60cdfa24_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4fbda006711249eeaa1a111f60cdfa24_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"185.0,-0.0\" dur=\" 0.990s\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4fbda006711249eeaa1a111f60cdfa24_6\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-180.0,0,0\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_5.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"185.0,-0.0\" to=\"185.0,-185.0\" dur=\" 0.990s\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4fbda006711249eeaa1a111f60cdfa24_8\" type=\"rotate\" from=\"-180.0,0,0\" to=\"-270.0,0,0\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_7.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"185.0,-185.0\" to=\"0.0,-185.00000000000003\" dur=\" 0.990s\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_8.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4fbda006711249eeaa1a111f60cdfa24_10\" type=\"rotate\" from=\"-270.0,0,0\" to=\"-360.0,0,0\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_9.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-185.00000000000003\" to=\"-3.398394867633905e-14,-2.842170943040401e-14\" dur=\" 0.990s\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_10.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4fbda006711249eeaa1a111f60cdfa24_12\" type=\"rotate\" from=\"-360.0,0,0\" to=\"-495.0,0,0\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_11.end\" dur=\" 0.125s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_12.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-3.398394867633905e-14,-2.842170943040401e-14\" to=\"185.26197667087547,-185.26197667087544\" dur=\" 1.402s\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_12.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_13.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4fbda006711249eeaa1a111f60cdfa24_14\" type=\"rotate\" from=\"-495.0,0,0\" to=\"-585.0,0,0\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_13.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_14.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"185.26197667087547,-185.26197667087544\" to=\"92.63098833543769,-277.89296500631315\" dur=\" 0.701s\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_14.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_15.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4fbda006711249eeaa1a111f60cdfa24_16\" type=\"rotate\" from=\"-585.0,0,0\" to=\"-675.0,0,0\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_15.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_16.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"92.63098833543769,-277.89296500631315\" to=\"1.4210854715202004e-14,-185.26197667087536\" dur=\" 0.701s\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_16.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_17.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4fbda006711249eeaa1a111f60cdfa24_18\" type=\"rotate\" from=\"-675.0,0,0\" to=\"-765.0,0,0\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_17.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4fbda006711249eeaa1a111f60cdfa24_18.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"1.4210854715202004e-14,-185.26197667087536\" to=\"185.26197667087553,2.842170943040401e-14\" dur=\" 1.402s\" begin=\"af_4fbda006711249eeaa1a111f60cdfa24_18.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nforward(185)\nleft(90)\nforward(185)\nleft(90)\nforward(185)\nleft(90)\nforward(185)\nleft(135)\nforward(262)\nleft(90)\nforward(131)\nleft(90)\nforward(131)\nleft(90)\nforward(262)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "---\n\n#### Remarque générale\n\nCe document est une adaptation d'un ressource pédagogique tiré du catalogue modulo https://modulo-info.ch/. Il est sous license Creative Commons [BY-NC-SA](https://creativecommons.org/licenses/?lang=fr)\n" } ], diff --git a/Notebooks/01b_Complement_Print.ipynb b/Notebooks/01b_Complement_Print.ipynb index 17a4aaf22a000f863599d65f43d150a449379406..38b3108cb563ca37badaa72a9f7f3546838d36cf 100644 --- a/Notebooks/01b_Complement_Print.ipynb +++ b/Notebooks/01b_Complement_Print.ipynb @@ -1,203 +1,203 @@ { "cells": [ { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-danger\"> \n \nAttention: **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\nPour reprendre votre travail, il suffit d'ouvrir le fichier .ipynb en cliquant sur *Fichier ouvrir*\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "# 1b. Compléments : Afficher de l'information\nDans ce notebook nous apporterons quelques compléments aux notions abordées dans le premier *notebook*\n\nLes programmes ne se limitent pas à la réalisation de graphiques. En fait, pendant longtemps, le seul moyen d'interagir avec un programme était par le biais du texte.\n\nPar conséquent, les programmes sont également capables de manipuler du texte, y compris de lire, d'écrire et d'afficher des textes sur un écran. Dans ce contexte, les commandes `from turtle import *` et `done()`, habituellement utilisées pour le dessin avec la tortue, deviennent inutiles. En terme informatique, les textes sont appelés des chaînes de caractères.\n<pre>\n\n\n</pre>\n## L'instruction Print\nLa première instruction que nous allons voir est la fonction print qui permet d'afficher du texte à l'écran.\n\nEn Python, l'instruction `print(\"blabla\")` affiche le texte `blabla` dans la console à droite. " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-warning\"> \n\n**Important: les parenthèses et les guillemets sont nécessaires.**\n\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 1 </h3>\n\nTeste le programme suivant en appuyant sur Ctrl + Enter" }, { + "cell_type": "code", + "execution_count": 1, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "print(\"blabla\")", - "execution_count": 1, "outputs": [ { + "name": "stdout", "output_type": "stream", - "text": "blabla\n", - "name": "stdout" + "text": "blabla\n" } - ] + ], + "source": "print(\"blabla\")" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 2 </h3>\n\nÉcris un programme qui permet d'afficher le texte `Vive l'instruction print !`, puis vérifie en appuyant sur Ctrl + Enter." }, { + "cell_type": "code", + "execution_count": 3, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "# à compléter", - "execution_count": 3, - "outputs": [] + "outputs": [], + "source": "# à compléter" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Afficher plusieurs lignes de texte\nPour afficher plusieurs lignes, il suffit de répéter l'instruction `print` avec un notre message.\nAinsi, le code suivant :\n\n```python\nprint(\"blabla\")\nprint(\"blibli\")\n```\n\naffichera une ligne ` blabla ` puis une ligne ` blibli`.\n\n\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 3 </h3>\n\nComplète le programme pour afficher pous afficher le texte sur trois lignes suivant:\n```\nBonjour !\nComment allez-vous ?\nIl fait beau aujourd'hui.\n```" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "print(\"Bonjour !\")", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "print(\"Bonjour !\")" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Des programmes qui calculent\n\nLa fonction `print` ne sert pas qu'à afficher du texte, elle permet également d'afficher le résultat d'expressions, notamment des opérations arithmétiques.\n\nPar exemple, `print(3+3)` affichera le résultat de l'opération, soit... `6`. " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-warning\"> \n\n**Important: Pour effectuer le calcul, il faut ôter les guillemets, sinon le programme affichera le l'expression et non sont résultat. Par exemple, l'instruction `print(\"3+3\")` afficherait simplement `3+3` et pas `6`**\n\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 4 </h3>\n\nTeste le code ci-dessous puis modifie-le afin d'afficher le résultat de **18975 + 98756** dans la console, et vérifie en appuyant sur Ctrl + Enter." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "print(3+3)", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "print(3+3)" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Les opérations avec les nombres\n\nEn programmation `Python`, on a les opérateurs mathématiques suivant : \n* \\+ pour l'addition\n* \\- pour la soustraction\n* \\* pour la multiplication\n* \\/ pour la division\n* \\*\\* pour la puissance\n* \\// pour la division entière\n* \\% pour le reste de la division entière\n\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 5 </h3>\n\nTeste tous ces opérateurs pour bien comprendre les derniers, puis écris un code pour afficher le résultat de $(264 · 53)/22+274$ dans la console, et vérifie en appuyant sur Ctrl + Enter." }, { + "cell_type": "code", + "execution_count": 7, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "", - "execution_count": 7, "outputs": [ { - "output_type": "execute_result", - "execution_count": 7, "data": { "text/plain": "10192" }, - "metadata": {} + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" } - ] + ], + "source": "" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 6 </h3>\n\nNote sur une feuille de papier ce qui va être affiché par chacune des instructions suivantes:\n\n 1. print(3+5)\n 2. print(7*2)\n 3. print(8/4)\n 4. print(7/2)\n 5. print(7//2)\n 6. print(2**3)\n 7. print(13%5)\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponses\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\n\n1. `8`<br>\n2. `14`<br>\n3. `2`<br>\n4. `3.5`<br>\n5. `3`<br>\n6. `8`<br>\n7. `3`<br>\n \n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 7 </h3>\n\nQuelle opération pourrait-on utiliser pour reconnaître si un nombre est pair ou impair? (une opération qui donnerait toujours le même résultat si le nombre est pair et toujours le même résultat si le nombre est impair)\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\n\nOn utilise le reste de la division entière (opérateur `%` par 2. Si le résultat est 0 le nombre est pair, si il vaut 1 c'est qu'il est impair. \n \n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 8 </h3>\n\nNote sur une feuille de papier ce qui va être affiché par chacune des instructions suivantes:\n\n 1. print(98145 % 2)\n 2. print(7841592 % 2)\n 3. print(879 % 10)\n " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponses\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\n\n1. `1`<br>\n2. `0`<br>\n3. `9`<br>\n\n \n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Afficher plusieurs valeurs dans un print\n\nIl est aussi possible d'afficher plusieurs valeurs sur la même ligne avec la commande `print`. Pour ce faire, il suffit de séparer les valeur avec des virgules.\nPar exemple, `print(\"Aujourd'hui, j'ai\", 20 * 2 + 1, \"ans\")` affichera `Aujourd'hui, j'ai 41 ans`.\n\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 9 </h3>\n\nEcrire un programme qui affiche `Dans une images codé en 24 bit il y a 2**24 couleurs` où à la place de `2**24` il y a le résultat du calcul (c'est-à-dire le résultat de $2^{24}$) . Vérifier en appuyant sur Ctrl + Enter." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "# à compléter", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "# à compléter" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 10 </h3>\n\nEcrire un programme qui affiche un sapin\n```\n X\n XXX\n XXXXX\nXXXXXXX\n X\n X\n```" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "# à compléter", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "# à compléter" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 11 </h3>\n\nEcrire un programme qui affiche les annimaux suivants\n```\n|\\---/|\n| o_o |\n \\_^_/\n```\n\n```\n __\n .--()°'.'\n'|, . ,'\n !_-(_\\\n```\n\n*Voir sur [www.asciiart.eu](https://www.asciiart.eu/animals) d'autres idées*" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "# à compléter", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "# à compléter" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 12 </h3>\n\nUtiliser votre identifiant EEL et le mot de passe *Sismondi2024* pour faire les exercices de la **série A** de la plateforme [AlgoPython](https://www.algopython.fr/login). [](https://www.algopython.fr/login)\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "---\n\n#### Remarque générale\n\nCe document a été élaboré par les enseignant du collège Sismondi à Genève. Il est sous license Creative Commons [BY-NC-SA](https://creativecommons.org/licenses/?lang=fr)\n\n" } ], "metadata": { "kernelspec": { - "name": "python3", "display_name": "Python 3", - "language": "python" + "language": "python", + "name": "python3" } }, "nbformat": 4, diff --git a/Notebooks/01b_Complement_Print_corrige.ipynb b/Notebooks/01b_Complement_Print_corrige.ipynb index 30fc099d3ea33d47cbaccb59458e33b397be8c7d..5c61e401a99b96d9a62673a5b126f2df0bedf70f 100644 --- a/Notebooks/01b_Complement_Print_corrige.ipynb +++ b/Notebooks/01b_Complement_Print_corrige.ipynb @@ -1,359 +1,359 @@ { "cells": [ { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-danger\"> \n \n# Cours avec solution\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "# 1b. Compléments : Afficher de l'information\nDans ce notebook nous apporterons quelques compléments aux notions abordées dans le premier *notebook*\n\nLes programmes ne se limitent pas à la réalisation de graphiques. En fait, pendant longtemps, le seul moyen d'interagir avec un programme était par le biais du texte.\n\nPar conséquent, les programmes sont également capables de manipuler du texte, y compris de lire, d'écrire et d'afficher des textes sur un écran. Dans ce contexte, les commandes `from turtle import *` et `done()`, habituellement utilisées pour le dessin avec la tortue, deviennent inutiles. En terme informatique, les textes sont appelés des chaînes de caractères.\n<pre>\n\n\n</pre>\n## L'instruction Print\nLa première instruction que nous allons voir est la fonction print qui permet d'afficher du texte à l'écran.\n\nEn Python, l'instruction `print(\"blabla\")` affiche le texte `blabla` dans la console à droite. " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-warning\"> \n\n**Important: les parenthèses et les guillemets sont nécessaires.**\n\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 1 </h3>\n\nTeste le programme suivant en appuyant sur Ctrl + Enter" }, { + "cell_type": "code", + "execution_count": 1, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "print(\"blabla\")", - "execution_count": 1, "outputs": [ { + "name": "stdout", "output_type": "stream", - "text": "blabla\n", - "name": "stdout" + "text": "blabla\n" } - ] + ], + "source": "print(\"blabla\")" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 2 </h3>\n\nÉcris un programme qui permet d'afficher le texte `Vive l'instruction print !`, puis vérifie en appuyant sur Ctrl + Enter." }, { + "cell_type": "code", + "execution_count": 3, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "# à compléter", - "execution_count": 3, - "outputs": [] + "outputs": [], + "source": "# à compléter" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n \n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 1, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "print(\"Vive l'instruction print !\")", - "execution_count": 1, "outputs": [ { + "name": "stdout", "output_type": "stream", - "text": "Vive l'instruction print !\n", - "name": "stdout" + "text": "Vive l'instruction print !\n" } - ] + ], + "source": "print(\"Vive l'instruction print !\")" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Afficher plusieurs lignes de texte\nPour afficher plusieurs lignes, il suffit de répéter l'instruction `print` avec un notre message.\nAinsi, le code suivant :\n\n```python\nprint(\"blabla\")\nprint(\"blibli\")\n```\n\naffichera une ligne ` blabla ` puis une ligne ` blibli`.\n\n\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 3 </h3>\n\nComplète le programme pour afficher pous afficher le texte sur trois lignes suivant:\n```\nBonjour !\nComment allez-vous ?\nIl fait beau aujourd'hui.\n```" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "print(\"Bonjour !\")", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "print(\"Bonjour !\")" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 2, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "print(\"Bonjour !\")\nprint(\"Comment allez-vous ?\")\nprint(\"Il fait beau aujourd'hui.\")", - "execution_count": 2, "outputs": [ { + "name": "stdout", "output_type": "stream", - "text": "Bonjour !\nComment allez-vous ?\nIl fait beau aujourd'hui.\n", - "name": "stdout" + "text": "Bonjour !\nComment allez-vous ?\nIl fait beau aujourd'hui.\n" } - ] + ], + "source": "print(\"Bonjour !\")\nprint(\"Comment allez-vous ?\")\nprint(\"Il fait beau aujourd'hui.\")" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Des programmes qui calculent\n\nLa fonction `print` ne sert pas qu'à afficher du texte, elle permet également d'afficher le résultat d'expressions, notamment des opérations arithmétiques.\n\nPar exemple, `print(3+3)` affichera le résultat de l'opération, soit... `6`. " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-warning\"> \n\n**Important: Pour effectuer le calcul, il faut ôter les guillemets, sinon le programme affichera le l'expression et non sont résultat. Par exemple, l'instruction `print(\"3+3\")` afficherait simplement `3+3` et pas `6`**\n\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 4 </h3>\n\nTeste le code ci-dessous puis modifie-le afin d'afficher le résultat de **18975 + 98756** dans la console, et vérifie en appuyant sur Ctrl + Enter." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "print(3+3)", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "print(3+3)" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 4, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "print(18975 + 98756)", - "execution_count": 4, "outputs": [ { + "name": "stdout", "output_type": "stream", - "text": "117731\n", - "name": "stdout" + "text": "117731\n" } - ] + ], + "source": "print(18975 + 98756)" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Les opérations avec les nombres\n\nEn programmation `Python`, on a les opérateurs mathématiques suivant : \n* \\+ pour l'addition\n* \\- pour la soustraction\n* \\* pour la multiplication\n* \\\\ pour la division\n* \\*\\* pour la puissance\n* \\\\\\\\ pour la division entière\n* \\% pour le reste de la division entière\n\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 5 </h3>\n\nTeste tous ces opérateurs pour bien comprendre les derniers, puis écris un code pour afficher le résultat de $(264 · 53)/22+274$ dans la console, et vérifie en appuyant sur Ctrl + Enter." }, { + "cell_type": "code", + "execution_count": 7, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "", - "execution_count": 7, "outputs": [ { - "output_type": "execute_result", - "execution_count": 7, "data": { "text/plain": "10192" }, - "metadata": {} + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" } - ] + ], + "source": "" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 6, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "print((264*53)/22+274)", - "execution_count": 6, "outputs": [ { + "name": "stdout", "output_type": "stream", - "text": "910.0\n", - "name": "stdout" + "text": "910.0\n" } - ] + ], + "source": "print((264*53)/22+274)" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 6 </h3>\n\nNote sur une feuille de papier ce qui va être affiché par chacune des instructions suivantes:\n\n 1. print(3+5)\n 2. print(7*2)\n 3. print(8/4)\n 4. print(5/2)\n 5. print(5//2)\n 6. print(2**3)\n 7. print(12%5)\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponses\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\n\n1. `8`<br>\n2. `14`<br>\n3. `2`<br>\n4. `2.5`<br>\n5. `2`<br>\n6. `8`<br>\n7. `2`<br>\n \n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 7 </h3>\n\nQuelle opération pourrait-on utiliser pour reconnaître si un nombre est pair ou impair? (une opération qui donnerait toujours le même résultat si le nombre est pair et toujours le même résultat si le nombre est impair)\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\n\nOn utilise le reste de la division entière (opérateur `%` par 2. Si le résultat est 0 le nombre est pair, si il vaut 1 c'est qu'il est impair. \n \n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 8 </h3>\n\nNote sur une feuille de papier ce qui va être affiché par chacune des instructions suivantes:\n\n 1. print(98145 % 2)\n 2. print(7841592 % 2)\n 3. print(879 % 10)\n " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponses\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\n\n1. `1`<br>\n2. `0`<br>\n3. `9`<br>\n\n \n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Afficher plusieurs valeurs dans un print\n\nIl est aussi possible d'afficher plusieurs valeurs sur la même ligne avec la commande `print`. Pour ce faire, il suffit de séparer les valeur avec des virgules.\nPar exemple, `print(\"Aujourd'hui, j'ai\", 20 * 2 + 1, \"ans\")` affichera `Aujourd'hui, j'ai 41 ans`.\n\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 9 </h3>\n\nEcrire un programme qui affiche `Le résultat de 10192 / 13 est :` où à la place de `10192 / 13`il y a le résultat du calcul . Vérifier en appuyant sur Ctrl + Enter." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "# à compléter", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "# à compléter" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 7, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "print(\"Le résultat de \", 10192 / 13, \"est :\")", - "execution_count": 7, "outputs": [ { + "name": "stdout", "output_type": "stream", - "text": "Le résultat de 784.0 est :\n", - "name": "stdout" + "text": "Le résultat de 784.0 est :\n" } - ] + ], + "source": "print(\"Le résultat de \", 10192 / 13, \"est :\")" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 10 </h3>\n\nEcrire un programme qui affiche un sapin\n```\n X\n XXX\n XXXXX\nXXXXXXX\n X\n X\n```" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "# à compléter", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "# à compléter" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 8, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "print(\" X\")\nprint(\" XXX\")\nprint(\" XXXXX\")\nprint(\"XXXXXXX\")\nprint(\" X\")\nprint(\" X\")", - "execution_count": 8, "outputs": [ { + "name": "stdout", "output_type": "stream", - "text": " X\n XXX\n XXXXX\nXXXXXXX\n X\n X\n", - "name": "stdout" + "text": " X\n XXX\n XXXXX\nXXXXXXX\n X\n X\n" } - ] + ], + "source": "print(\" X\")\nprint(\" XXX\")\nprint(\" XXXXX\")\nprint(\"XXXXXXX\")\nprint(\" X\")\nprint(\" X\")" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 11 </h3>\n\nEcrire un programme qui affiche les annimaux suivants\n```\n|\\---/|\n| o_o |\n \\_^_/\n```\n\n```\n __\n .--()°'.'\n'|, . ,'\n !_-(_\\\n```\n\n*Voir sur [www.asciiart.eu](https://www.asciiart.eu/animals) d'autres idées*" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "# à compléter", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "# à compléter" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": 18, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "print(\"|\\---/|\")\nprint(\"| o_o |\")\nprint(\" \\_^_/\")", - "execution_count": 18, "outputs": [ { + "name": "stdout", "output_type": "stream", - "text": "|\\---/|\n| o_o |\n \\_^_/\n", - "name": "stdout" + "text": "|\\---/|\n| o_o |\n \\_^_/\n" } - ] + ], + "source": "print(\"|\\---/|\")\nprint(\"| o_o |\")\nprint(\" \\_^_/\")" }, { - "metadata": { - "trusted": true, - "scrolled": true - }, "cell_type": "code", - "source": "print(\" __\")\nprint(\" .--()°'.'\")\nprint(\"'|, . ,'\")\nprint(\" !_-(_ \", \"\\\\\")", "execution_count": 34, + "metadata": { + "scrolled": true, + "trusted": true + }, "outputs": [ { + "name": "stdout", "output_type": "stream", - "text": " __\n .--()°'.'\n'|, . ,'\n !_-(_ \\\n", - "name": "stdout" + "text": " __\n .--()°'.'\n'|, . ,'\n !_-(_ \\\n" } - ] + ], + "source": "print(\" __\")\nprint(\" .--()°'.'\")\nprint(\"'|, . ,'\")\nprint(\" !_-(_ \", \"\\\\\")" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "---\n\n#### Remarque générale\n\nCe document a été élaboré par les enseignant du collège Sismondi à Genève. Il est sous license Creative Commons [BY-NC-SA](https://creativecommons.org/licenses/?lang=fr)\n\n" } ], "metadata": { "kernelspec": { - "name": "python3", "display_name": "Python 3", - "language": "python" + "language": "python", + "name": "python3" } }, "nbformat": 4, diff --git "a/Notebooks/01c_Deuxi\303\250me_programme.ipynb" "b/Notebooks/01c_Deuxi\303\250me_programme.ipynb" index 42b4bf41f49bd97d8af55a948bdad24ee13e7601..ddd9398ffa4456ee1554d7aeb10cb996a2b00d15 100644 --- "a/Notebooks/01c_Deuxi\303\250me_programme.ipynb" +++ "b/Notebooks/01c_Deuxi\303\250me_programme.ipynb" @@ -1,280 +1,280 @@ { "cells": [ { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "# Organisation et enregistrement des fichiers.\n\nIl est primordial et important que vous sauvegardez vos exercices. Vous avez deux alternatives:\n1. Dans votre dossier personnel “Mes documents” qui sera accessible depuis tous les ordinateurs du collège.\n2. Depuis votre Drive accessible depuis le site: https://eduge.ch. En sauvegardant dans votre drive, les fichiers seront accessibles depuis n’importe quel ordinateur ayant accès au WEB, donc depuis la maison.\n\n\n\n<div class = \"alert alert-danger\"> \n \n**Attention:**\n \nLes fichiers sauvegardés sur le dossier “Bureau”, ne seront accessibles que depuis l’ordinateur où vous vous trouvez ! De plus, si le poste est réinstallé, vous perdez tout !!! Donc pas de sauvegarde de fichier sur le bureau.\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\nPour reprendre votre travail, il suffit d'ouvrir le fichier .ipynb en cliquant sur *Fichier ouvrir*\n</div>\n\nNous vous conseillé de créer les dossiers suivants dans votre dossier “Mes documents” ou “Drive”:\n```\nMes documents\\\n Info_1ère\\\n Python\\\n Projet\\\n Exposé\\\n```\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "# 1 Rappel: module Turtle\n## 1.1 Le module `turtle`\n\nNous continuons l’utilisation du module Turtle pour dessiner. Quelques rappels essentiels:\n* Pour importer toutes les fonctions du module turtle, il est obligatoire d’insérer, au début du programme, la ligne suivante:\n```python\nfrom turtle import *\n```\n\nOn s’imagine une tortue qui se déplace sur un canevas et laisse une trace.\n\nCi-dessous, vous trouvez notre premier programme de trois lignes :\n\n- dans la première ligne, nous importons toutes (`*`) les fonctions du module turtle,\n\n- avec `shape('turtle')`, nous affichons une tortue (au lieu de la flèche),\n\n- avec `forward(150)`, nous faisons avancer la tortue de 150 pixels,\n\n- avec `done()`, nous lançons de tracage de la figure.\n\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class=\"alert alert-block alert-info\"><b>A savoir:</b> Cliquez sur le bouton <b>Excécuter</b> pour tester le programme. </div>" }, { + "cell_type": "code", + "execution_count": 61, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nshape('turtle')\nforward(150)\ndone()", - "execution_count": 61, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_7\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_6.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_9\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_8.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_11\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"150\" dur=\" 0.803s\" fill=\"freeze\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_10.end\" from=\"0\" to=\"0\" dur=\" 0.803s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_1\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animate id=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_6\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_5.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"1\" to=\"0\"></animate><animateMotion begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"0.0,-0.0\" dur=\"1ms\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_6.end\" fill=\"freeze\"></animateMotion></polygon><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animateMotion begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion id=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_5\" from=\"0.0,-0.0\" to=\"0.0,-0.0\" dur=\"1ms\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_4.end\" fill=\"freeze\"></animateMotion><animateTransform attributename=\"transform\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_4.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animate begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_4.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animate id=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_8\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_7.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_10\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_9.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"150.0,-0.0\" dur=\" 0.803s\" begin=\"af_2cfb98432c1d4fa5b9a80c48969bb8b0_10.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nshape('turtle')\nforward(150)\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "Quelques fonction de Turtle avec des exemples:\n\n| Fonction |Exemple|Commentaire|\n|:-------- |:------|:----------|\n|forward(x)|forward(150)|Trace un trait de 150 points|\n|backward(x)|backward(150)|Trace un trait “à reculons” de 150 points|\n|left(n)|left(60)|Tourne sur place la tortue de 60° à gauche|\n|right(n)|right(60)|Tourne sur place la tortue de 60° à droite|\n|width(x)|width(5)|Change l’épaisseur à 5 points|\n|color(\"c\")|color(\"yellow\")|Change la couleur du trait (mais aucun trait n’est tracé à ce moment). Notez les guillemets !|\n|penup()|penup()|Lève la tortue (permet de se déplacer sans dessiner)|\n|pendown()|pendown()|Baisse le stylo|" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "***\n\n## 1.2 Raquette de ping-pong\n\nL'épaisseur de ligne est très utile dans le dessin.\n\n### Exercice 1\nTransformez la raquette de ping-pong en haltères de musculation." }, { + "cell_type": "code", + "execution_count": 62, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nwidth(20)\nforward(100)\nwidth(80)\nforward(20)\n\ndone()", - "execution_count": 62, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_bacba91d1fef4ec4903f402a6ce47da1_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_bacba91d1fef4ec4903f402a6ce47da1_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 20\"><animate id=\"af_bacba91d1fef4ec4903f402a6ce47da1_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"100\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_4.end\" from=\"0\" to=\"0\" dur=\" 0.535s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_4.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.535s\" fill=\"freeze\"></set></line><line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"0\" style=\"stroke: black;stroke-width: 80\"><animate id=\"af_bacba91d1fef4ec4903f402a6ce47da1_6\" attributename=\"x2\" attributetype=\"XML\" from=\"100\" to=\"120\" dur=\" 0.107s\" fill=\"freeze\" begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_5.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_5.end\" from=\"0\" to=\"0\" dur=\" 0.107s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_5.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.107s\" fill=\"freeze\"></set></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_bacba91d1fef4ec4903f402a6ce47da1_1\" begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_bacba91d1fef4ec4903f402a6ce47da1_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_bacba91d1fef4ec4903f402a6ce47da1_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"100.0,-0.0\" dur=\" 0.535s\" begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"100.0,-0.0\" to=\"120.0,-0.0\" dur=\" 0.107s\" begin=\"af_bacba91d1fef4ec4903f402a6ce47da1_5.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nwidth(20)\nforward(100)\nwidth(80)\nforward(20)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 1.3 Lunettes de soleil\n\nVoici encore un exemple où, avec un simple changement d'épaisseur, vous obtenez un effet très intéressant.\n\n### Exercice 2\nAjoutez la première branche qui manque." }, { + "cell_type": "code", + "execution_count": 63, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nwidth(50)\nforward(20)\nwidth(10)\nforward(60)\nwidth(50)\nforward(20)\nwidth(10)\nforward(40)\nleft(45)\nforward(60)\n\ndone()", - "execution_count": 63, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_79d7a63cb1c6468e94f28125d1042bb1_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_79d7a63cb1c6468e94f28125d1042bb1_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 50\"><animate id=\"af_79d7a63cb1c6468e94f28125d1042bb1_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"20\" dur=\" 0.107s\" fill=\"freeze\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_4.end\" from=\"0\" to=\"0\" dur=\" 0.107s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_4.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.107s\" fill=\"freeze\"></set></line><line x1=\"20\" y1=\"0\" x2=\"20\" y2=\"0\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_79d7a63cb1c6468e94f28125d1042bb1_6\" attributename=\"x2\" attributetype=\"XML\" from=\"20\" to=\"80\" dur=\" 0.321s\" fill=\"freeze\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_5.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_5.end\" from=\"0\" to=\"0\" dur=\" 0.321s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_5.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.321s\" fill=\"freeze\"></set></line><line x1=\"80\" y1=\"0\" x2=\"80\" y2=\"0\" style=\"stroke: black;stroke-width: 50\"><animate id=\"af_79d7a63cb1c6468e94f28125d1042bb1_7\" attributename=\"x2\" attributetype=\"XML\" from=\"80\" to=\"100\" dur=\" 0.107s\" fill=\"freeze\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_6.end\" from=\"0\" to=\"0\" dur=\" 0.107s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_6.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.107s\" fill=\"freeze\"></set></line><line x1=\"100\" y1=\"0\" x2=\"100\" y2=\"0\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_79d7a63cb1c6468e94f28125d1042bb1_8\" attributename=\"x2\" attributetype=\"XML\" from=\"100\" to=\"140\" dur=\" 0.214s\" fill=\"freeze\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_7.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_7.end\" from=\"0\" to=\"0\" dur=\" 0.214s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_7.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.214s\" fill=\"freeze\"></set></line><line x1=\"140\" y1=\"0\" x2=\"140\" y2=\"0\" style=\"stroke: black;stroke-width: 10\"><animate id=\"af_79d7a63cb1c6468e94f28125d1042bb1_10\" attributename=\"x2\" attributetype=\"XML\" from=\"140\" to=\"182.42640687119285\" dur=\" 0.321s\" fill=\"freeze\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_9.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_9.end\" from=\"0\" to=\"-42.426406871192846\" dur=\" 0.321s\" fill=\"freeze\"></animate><set attributename=\"stroke-linecap\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_9.end\" attributetype=\"xml\" to=\"round\" dur=\" 0.321s\" fill=\"freeze\"></set></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_79d7a63cb1c6468e94f28125d1042bb1_1\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_79d7a63cb1c6468e94f28125d1042bb1_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_79d7a63cb1c6468e94f28125d1042bb1_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"20.0,-0.0\" dur=\" 0.107s\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"20.0,-0.0\" to=\"80.0,-0.0\" dur=\" 0.321s\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_5.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"80.0,-0.0\" to=\"100.0,-0.0\" dur=\" 0.107s\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"100.0,-0.0\" to=\"140.0,-0.0\" dur=\" 0.214s\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_7.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_79d7a63cb1c6468e94f28125d1042bb1_9\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-135.0,0,0\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_8.end\" dur=\" 0.042s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"140.0,-0.0\" to=\"182.42640687119285,-42.426406871192846\" dur=\" 0.321s\" begin=\"af_79d7a63cb1c6468e94f28125d1042bb1_9.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nwidth(50)\nforward(20)\nwidth(10)\nforward(60)\nwidth(50)\nforward(20)\nwidth(10)\nforward(40)\nleft(45)\nforward(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 1.4 Équivalence\n\nLa tortue possède 4 fonctions de déplacement, mais à strictement parler, on pourrait s'en sortir avec seulement deux fonctions, `forward()` et `left()`, car :\n\n- `backward(d)` est équivalent à `forward(-d)`\n- `right(a)` est équivalent à `left(-a)`\n\nDans le programme ci-dessous, les 4 lignes du deuxième bloc sont équivalentes aux 4 instructions du premier bloc et donnent un résultat identique.\n\n### Exercice 3\nExpliquez avec un commentaire ce que font les 2 dernières instructions avant le `done()`.\n" }, { + "cell_type": "code", + "execution_count": 64, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(160)\nleft(90)\nforward(100)\nleft(90)\n\nbackward(-160) # équivalent à forward(160)\nright(-90) # équivalent à left(90)\nbackward(-100)\nright(-90)\n\ndone()", - "execution_count": 64, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_3f389a76318047429655100d33750f75_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_3f389a76318047429655100d33750f75_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_3f389a76318047429655100d33750f75_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_3f389a76318047429655100d33750f75_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_3f389a76318047429655100d33750f75_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"160\" dur=\" 0.856s\" fill=\"freeze\" begin=\"af_3f389a76318047429655100d33750f75_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_3f389a76318047429655100d33750f75_4.end\" from=\"0\" to=\"0\" dur=\" 0.856s\" fill=\"freeze\"></animate></line><line x1=\"160\" y1=\"0\" x2=\"160\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_3f389a76318047429655100d33750f75_7\" attributename=\"x2\" attributetype=\"XML\" from=\"160\" to=\"160\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_3f389a76318047429655100d33750f75_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_3f389a76318047429655100d33750f75_6.end\" from=\"0\" to=\"-100\" dur=\" 0.535s\" fill=\"freeze\"></animate></line><line x1=\"160\" y1=\"-100\" x2=\"160\" y2=\"-100\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_3f389a76318047429655100d33750f75_9\" attributename=\"x2\" attributetype=\"XML\" from=\"160\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_3f389a76318047429655100d33750f75_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_3f389a76318047429655100d33750f75_8.end\" from=\"-100\" to=\"-100.00000000000001\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"-100.00000000000001\" x2=\"0\" y2=\"-100.00000000000001\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_3f389a76318047429655100d33750f75_11\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"-1.8369701987210297e-14\" dur=\"1ms\" fill=\"freeze\" begin=\"af_3f389a76318047429655100d33750f75_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_3f389a76318047429655100d33750f75_10.end\" from=\"-100.00000000000001\" to=\"-1.4210854715202004e-14\" dur=\"1ms\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_3f389a76318047429655100d33750f75_1\" begin=\"af_3f389a76318047429655100d33750f75_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_3f389a76318047429655100d33750f75_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_3f389a76318047429655100d33750f75_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_3f389a76318047429655100d33750f75_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_3f389a76318047429655100d33750f75_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_3f389a76318047429655100d33750f75_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_3f389a76318047429655100d33750f75_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_3f389a76318047429655100d33750f75_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"160.0,-0.0\" dur=\" 0.856s\" begin=\"af_3f389a76318047429655100d33750f75_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_3f389a76318047429655100d33750f75_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_3f389a76318047429655100d33750f75_6\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-180.0,0,0\" begin=\"af_3f389a76318047429655100d33750f75_5.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_3f389a76318047429655100d33750f75_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"160.0,-0.0\" to=\"160.0,-100.0\" dur=\" 0.535s\" begin=\"af_3f389a76318047429655100d33750f75_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_3f389a76318047429655100d33750f75_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_3f389a76318047429655100d33750f75_8\" type=\"rotate\" from=\"-180.0,0,0\" to=\"-270.0,0,0\" begin=\"af_3f389a76318047429655100d33750f75_7.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_3f389a76318047429655100d33750f75_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"160.0,-100.0\" to=\"0.0,-100.00000000000001\" dur=\"1ms\" begin=\"af_3f389a76318047429655100d33750f75_8.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_3f389a76318047429655100d33750f75_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_3f389a76318047429655100d33750f75_10\" type=\"rotate\" from=\"-270.0,0,0\" to=\"-360.0,0,0\" begin=\"af_3f389a76318047429655100d33750f75_9.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_3f389a76318047429655100d33750f75_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-100.00000000000001\" to=\"-1.8369701987210297e-14,-1.4210854715202004e-14\" dur=\"1ms\" begin=\"af_3f389a76318047429655100d33750f75_10.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_3f389a76318047429655100d33750f75_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_3f389a76318047429655100d33750f75_12\" type=\"rotate\" from=\"-360.0,0,0\" to=\"-450.0,0,0\" begin=\"af_3f389a76318047429655100d33750f75_11.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nforward(160)\nleft(90)\nforward(100)\nleft(90)\n\nbackward(-160) # équivalent à forward(160)\nright(-90) # équivalent à left(90)\nbackward(-100)\nright(-90)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 1.5 Exercices d'entraînement " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 4\nÉcrivez un programme qui dessine un losange conformément au croquis ci-dessous.\n\n" }, { + "cell_type": "code", + "execution_count": 65, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\n# à compléter...\n\ndone()", - "execution_count": 65, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_5dd0cbe364cf4f6e883a1cddab7050d6_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\n# à compléter...\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 5\nDessinez un hexagone régulier dont la longueur des côtés vaut 100 (voir la figure ci-dessous)." }, { + "cell_type": "markdown", "metadata": { "trusted": true }, - "cell_type": "markdown", "source": "<img src=\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiID8+CjxzdmcgYmFzZVByb2ZpbGU9ImZ1bGwiIGhlaWdodD0iMzAwcHgiIHZlcnNpb249IjEuMSIgd2lkdGg9IjMwMHB4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOmV2PSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL3htbC1ldmVudHMiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZGVmcyAvPjxwb2x5bGluZSBjbGlwLXBhdGg9InVybCgjYm9yZGVyX2NsaXApIiBmaWxsPSJub25lIiBwb2ludHM9IjEwMC41LDIwMC41IDIwMC41LDIwMC41IDI1MC41LDExMy44OTc0NTk2MjE1NTYxNCAyMDAuNTAwMDAwMDAwMDAwMDMsMjcuMjk0OTE5MjQzMTEyMjYgMTAwLjUwMDAwMDAwMDAwMDAzLDI3LjI5NDkxOTI0MzExMjIyIDUwLjUsMTEzLjg5NzQ1OTYyMTU1NjA1IDEwMC40OTk5OTk5OTk5OTk5NCwyMDAuNDk5OTk5OTk5OTk5OTQiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIxIiAvPjwvc3ZnPg==\" />" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "*Exercice tiré du livre **L'informatique simplement** de J. Hromkovic et T. Kohn*" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class=\"alert alert-block alert-info\"> \n <b> Indication</b>\n <br>\nPour tracer un hexagone, la tortue doit tourner 6 fois. Comme un tour complet représente 360°, à chaque angle la tortue doit tourné de \\( \\frac{360}{6}=60 \\) degrés.\n </div>" }, { + "cell_type": "code", + "execution_count": 66, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(100)\n\n# à compléter...\n\ndone()", - "execution_count": 66, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_d7f45b50df35491ea8c223fe64ecb265_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_d7f45b50df35491ea8c223fe64ecb265_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_d7f45b50df35491ea8c223fe64ecb265_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_d7f45b50df35491ea8c223fe64ecb265_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_d7f45b50df35491ea8c223fe64ecb265_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"100\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_d7f45b50df35491ea8c223fe64ecb265_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_d7f45b50df35491ea8c223fe64ecb265_4.end\" from=\"0\" to=\"0\" dur=\" 0.535s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_d7f45b50df35491ea8c223fe64ecb265_1\" begin=\"af_d7f45b50df35491ea8c223fe64ecb265_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_d7f45b50df35491ea8c223fe64ecb265_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_d7f45b50df35491ea8c223fe64ecb265_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_d7f45b50df35491ea8c223fe64ecb265_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_d7f45b50df35491ea8c223fe64ecb265_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_d7f45b50df35491ea8c223fe64ecb265_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_d7f45b50df35491ea8c223fe64ecb265_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_d7f45b50df35491ea8c223fe64ecb265_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"100.0,-0.0\" dur=\" 0.535s\" begin=\"af_d7f45b50df35491ea8c223fe64ecb265_4.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nforward(100)\n\n# à compléter...\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 6\nDessinez une chaise." }, { + "cell_type": "code", + "execution_count": 67, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nleft(90)\nforward(100)\n\n# à compléter...\n\ndone()", - "execution_count": 67, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_669c5af7957a45dfbeb22513396db8b1_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_669c5af7957a45dfbeb22513396db8b1_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_669c5af7957a45dfbeb22513396db8b1_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_669c5af7957a45dfbeb22513396db8b1_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_669c5af7957a45dfbeb22513396db8b1_6\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"6.123233995736766e-15\" dur=\" 0.535s\" fill=\"freeze\" begin=\"af_669c5af7957a45dfbeb22513396db8b1_5.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_669c5af7957a45dfbeb22513396db8b1_5.end\" from=\"0\" to=\"-100\" dur=\" 0.535s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_669c5af7957a45dfbeb22513396db8b1_1\" begin=\"af_669c5af7957a45dfbeb22513396db8b1_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_669c5af7957a45dfbeb22513396db8b1_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_669c5af7957a45dfbeb22513396db8b1_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_669c5af7957a45dfbeb22513396db8b1_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_669c5af7957a45dfbeb22513396db8b1_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_669c5af7957a45dfbeb22513396db8b1_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_669c5af7957a45dfbeb22513396db8b1_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_669c5af7957a45dfbeb22513396db8b1_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_669c5af7957a45dfbeb22513396db8b1_5\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-180.0,0,0\" begin=\"af_669c5af7957a45dfbeb22513396db8b1_4.end\" dur=\" 0.083s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_669c5af7957a45dfbeb22513396db8b1_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"6.123233995736766e-15,-100.0\" dur=\" 0.535s\" begin=\"af_669c5af7957a45dfbeb22513396db8b1_5.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nleft(90)\nforward(100)\n\n# à compléter...\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 1.6 Les arcs et les cercles\nSi on souhaite que la tortue se déplace sans écrire (sans dessiner), on utilise l'instruction penup() ou up(), puis pour reprendre l'écriture, on utilise la fonction pendown() ou down().\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 7\nLa fonction `circle(R, A)` permet de dessiner un arc de cercle de rayon R et d'angle A.\n\nModifier le code suivant pour comprendre comment la fonction circle(R, A) dessine. Essayer et modifer le code suvant avec les valeurs:\n* ``circle(100, 180)``\n* ``circle(100, 90)``\n\nEnsuite changer l'angle avant de dessiner, par exemple right(90) avant d'utiliser circle(100, 180)\n\n\n" }, { + "cell_type": "code", + "execution_count": 68, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ncircle(100, 180)\n\ndone()", - "execution_count": 68, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_6\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"22.25209339563144\" dur=\" 0.120s\" fill=\"freeze\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_5.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_5.end\" from=\"0\" to=\"-2.5072087818176394\" dur=\" 0.120s\" fill=\"freeze\"></animate></line><line x1=\"22.25209339563144\" y1=\"-2.5072087818176394\" x2=\"22.25209339563144\" y2=\"-2.5072087818176394\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_8\" attributename=\"x2\" attributetype=\"XML\" from=\"22.25209339563144\" to=\"43.388373911755814\" dur=\" 0.120s\" fill=\"freeze\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_7.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_7.end\" from=\"-2.5072087818176394\" to=\"-9.903113209758086\" dur=\" 0.120s\" fill=\"freeze\"></animate></line><line x1=\"43.388373911755814\" y1=\"-9.903113209758086\" x2=\"43.388373911755814\" y2=\"-9.903113209758086\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_10\" attributename=\"x2\" attributetype=\"XML\" from=\"43.388373911755814\" to=\"62.34898018587336\" dur=\" 0.120s\" fill=\"freeze\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_9.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_9.end\" from=\"-9.903113209758086\" to=\"-21.816851753197014\" dur=\" 0.120s\" fill=\"freeze\"></animate></line><line x1=\"62.34898018587336\" y1=\"-21.816851753197014\" x2=\"62.34898018587336\" y2=\"-21.816851753197014\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_12\" attributename=\"x2\" attributetype=\"XML\" from=\"62.34898018587336\" to=\"78.18314824680299\" dur=\" 0.120s\" fill=\"freeze\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_11.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_11.end\" from=\"-21.816851753197014\" to=\"-37.65101981412664\" dur=\" 0.120s\" fill=\"freeze\"></animate></line><line x1=\"78.18314824680299\" y1=\"-37.65101981412664\" x2=\"78.18314824680299\" y2=\"-37.65101981412664\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_14\" attributename=\"x2\" attributetype=\"XML\" from=\"78.18314824680299\" to=\"90.09688679024191\" dur=\" 0.120s\" fill=\"freeze\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_13.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_13.end\" from=\"-37.65101981412664\" to=\"-56.61162608824418\" dur=\" 0.120s\" fill=\"freeze\"></animate></line><line x1=\"90.09688679024191\" y1=\"-56.61162608824418\" x2=\"90.09688679024191\" y2=\"-56.61162608824418\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_16\" attributename=\"x2\" attributetype=\"XML\" from=\"90.09688679024191\" to=\"97.49279121818236\" dur=\" 0.120s\" fill=\"freeze\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_15.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_15.end\" from=\"-56.61162608824418\" to=\"-77.74790660436855\" dur=\" 0.120s\" fill=\"freeze\"></animate></line><line x1=\"97.49279121818236\" y1=\"-77.74790660436855\" x2=\"97.49279121818236\" y2=\"-77.74790660436855\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_18\" attributename=\"x2\" attributetype=\"XML\" from=\"97.49279121818236\" to=\"100\" dur=\" 0.120s\" fill=\"freeze\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_17.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_17.end\" from=\"-77.74790660436855\" to=\"-100\" dur=\" 0.120s\" fill=\"freeze\"></animate></line><line x1=\"100\" y1=\"-100\" x2=\"100\" y2=\"-100\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_20\" attributename=\"x2\" attributetype=\"XML\" from=\"100\" to=\"97.49279121818236\" dur=\" 0.120s\" fill=\"freeze\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_19.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_19.end\" from=\"-100\" to=\"-122.25209339563145\" dur=\" 0.120s\" fill=\"freeze\"></animate></line><line x1=\"97.49279121818236\" y1=\"-122.25209339563145\" x2=\"97.49279121818236\" y2=\"-122.25209339563145\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_22\" attributename=\"x2\" attributetype=\"XML\" from=\"97.49279121818236\" to=\"90.09688679024191\" dur=\" 0.120s\" fill=\"freeze\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_21.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_21.end\" from=\"-122.25209339563145\" to=\"-143.38837391175582\" dur=\" 0.120s\" fill=\"freeze\"></animate></line><line x1=\"90.09688679024191\" y1=\"-143.38837391175582\" x2=\"90.09688679024191\" y2=\"-143.38837391175582\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_24\" attributename=\"x2\" attributetype=\"XML\" from=\"90.09688679024191\" to=\"78.18314824680297\" dur=\" 0.120s\" fill=\"freeze\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_23.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_23.end\" from=\"-143.38837391175582\" to=\"-162.34898018587336\" dur=\" 0.120s\" fill=\"freeze\"></animate></line><line x1=\"78.18314824680297\" y1=\"-162.34898018587336\" x2=\"78.18314824680297\" y2=\"-162.34898018587336\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_26\" attributename=\"x2\" attributetype=\"XML\" from=\"78.18314824680297\" to=\"62.34898018587334\" dur=\" 0.120s\" fill=\"freeze\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_25.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_25.end\" from=\"-162.34898018587336\" to=\"-178.18314824680297\" dur=\" 0.120s\" fill=\"freeze\"></animate></line><line x1=\"62.34898018587334\" y1=\"-178.18314824680297\" x2=\"62.34898018587334\" y2=\"-178.18314824680297\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_28\" attributename=\"x2\" attributetype=\"XML\" from=\"62.34898018587334\" to=\"43.38837391175579\" dur=\" 0.120s\" fill=\"freeze\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_27.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_27.end\" from=\"-178.18314824680297\" to=\"-190.0968867902419\" dur=\" 0.120s\" fill=\"freeze\"></animate></line><line x1=\"43.38837391175579\" y1=\"-190.0968867902419\" x2=\"43.38837391175579\" y2=\"-190.0968867902419\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_30\" attributename=\"x2\" attributetype=\"XML\" from=\"43.38837391175579\" to=\"22.252093395631416\" dur=\" 0.120s\" fill=\"freeze\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_29.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_29.end\" from=\"-190.0968867902419\" to=\"-197.49279121818233\" dur=\" 0.120s\" fill=\"freeze\"></animate></line><line x1=\"22.252093395631416\" y1=\"-197.49279121818233\" x2=\"22.252093395631416\" y2=\"-197.49279121818233\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_32\" attributename=\"x2\" attributetype=\"XML\" from=\"22.252093395631416\" to=\"-2.842170943040401e-14\" dur=\" 0.120s\" fill=\"freeze\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_31.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_31.end\" from=\"-197.49279121818233\" to=\"-199.99999999999994\" dur=\" 0.120s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_fd27c47a7a084eefb8c470e98305166d_1\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_5\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-96.42857142857143,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_4.end\" dur=\" 0.006s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"22.25209339563144,-2.5072087818176394\" dur=\" 0.120s\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_5.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_7\" type=\"rotate\" from=\"-96.42857142857143,0,0\" to=\"-109.28571428571429,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_6.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"22.25209339563144,-2.5072087818176394\" to=\"43.388373911755814,-9.903113209758086\" dur=\" 0.120s\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_7.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_9\" type=\"rotate\" from=\"-109.28571428571429,0,0\" to=\"-122.14285714285715,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_8.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"43.388373911755814,-9.903113209758086\" to=\"62.34898018587336,-21.816851753197014\" dur=\" 0.120s\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_9.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_11\" type=\"rotate\" from=\"-122.14285714285715,0,0\" to=\"-135.0,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_10.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"62.34898018587336,-21.816851753197014\" to=\"78.18314824680299,-37.65101981412664\" dur=\" 0.120s\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_11.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_12.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_13\" type=\"rotate\" from=\"-135.0,0,0\" to=\"-147.85714285714286,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_12.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_13.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"78.18314824680299,-37.65101981412664\" to=\"90.09688679024191,-56.61162608824418\" dur=\" 0.120s\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_13.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_14.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_15\" type=\"rotate\" from=\"-147.85714285714286,0,0\" to=\"-160.71428571428572,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_14.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_15.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"90.09688679024191,-56.61162608824418\" to=\"97.49279121818236,-77.74790660436855\" dur=\" 0.120s\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_15.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_16.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_17\" type=\"rotate\" from=\"-160.71428571428572,0,0\" to=\"-173.57142857142858,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_16.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_17.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"97.49279121818236,-77.74790660436855\" to=\"100.0,-100.0\" dur=\" 0.120s\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_17.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_18.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_19\" type=\"rotate\" from=\"-173.57142857142858,0,0\" to=\"-186.42857142857144,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_18.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_19.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"100.0,-100.0\" to=\"97.49279121818236,-122.25209339563145\" dur=\" 0.120s\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_19.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_20.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_21\" type=\"rotate\" from=\"-186.42857142857144,0,0\" to=\"-199.2857142857143,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_20.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_21.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"97.49279121818236,-122.25209339563145\" to=\"90.09688679024191,-143.38837391175582\" dur=\" 0.120s\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_21.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_22.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_23\" type=\"rotate\" from=\"-199.2857142857143,0,0\" to=\"-212.14285714285717,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_22.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_23.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"90.09688679024191,-143.38837391175582\" to=\"78.18314824680297,-162.34898018587336\" dur=\" 0.120s\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_23.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_24.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_25\" type=\"rotate\" from=\"-212.14285714285717,0,0\" to=\"-225.00000000000003,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_24.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_25.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"78.18314824680297,-162.34898018587336\" to=\"62.34898018587334,-178.18314824680297\" dur=\" 0.120s\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_25.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_26.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_27\" type=\"rotate\" from=\"-225.00000000000003,0,0\" to=\"-237.8571428571429,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_26.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_27.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"62.34898018587334,-178.18314824680297\" to=\"43.38837391175579,-190.0968867902419\" dur=\" 0.120s\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_27.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_28.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_29\" type=\"rotate\" from=\"-237.8571428571429,0,0\" to=\"-250.71428571428575,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_28.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_29.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"43.38837391175579,-190.0968867902419\" to=\"22.252093395631416,-197.49279121818233\" dur=\" 0.120s\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_29.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_30.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_31\" type=\"rotate\" from=\"-250.71428571428575,0,0\" to=\"-263.5714285714286,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_30.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_31.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"22.252093395631416,-197.49279121818233\" to=\"-2.842170943040401e-14,-199.99999999999994\" dur=\" 0.120s\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_31.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_32.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_33\" type=\"rotate\" from=\"-263.5714285714286,0,0\" to=\"-276.42857142857144,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_32.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_fd27c47a7a084eefb8c470e98305166d_33.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_fd27c47a7a084eefb8c470e98305166d_34\" type=\"rotate\" from=\"-276.42857142857144,0,0\" to=\"-270.0,0,0\" begin=\"af_fd27c47a7a084eefb8c470e98305166d_33.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\ncircle(100, 180)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 8\nÀ l'aide des fonctions:\n* `circle(angle,rayon)`\n* `color(\"choix_de_couleur\")`\n* `penup()`\n* `pendown()`\n* `width(épaisseur)`\n* `forward(pixel)`\nDessiner les deux cercles suivants d'épaisseur 5 en choississant 2 couleurs pour le premier cercle et 4 couleurs pour le deuxième:\n\n\n" }, { + "cell_type": "code", + "execution_count": 69, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\n# à compléter\n\ndone()", - "execution_count": 69, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_df315967dab44098a0d863fe002a56bd_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\n# à compléter\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exercice 9\nÉcrivez un programme qui dessine une voiture de couleur bleue avec des roues noires plus épaisse.\n\n\n\n" }, { + "cell_type": "code", + "execution_count": 70, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\n# à compléter\n\ndone()", - "execution_count": 70, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_923078fb5d3e4983bf1c785c740ed120_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\n# à compléter\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "---\n\n#### Remarque générale\n\nCe document est une adaptation d'un ressource pédagogique tiré du catalogue modulo https://modulo-info.ch/. Il est sous license Creative Commons [BY-NC-SA](https://creativecommons.org/licenses/?lang=fr)\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "" } ], "metadata": { diff --git a/Notebooks/02_Boucle_for.ipynb b/Notebooks/02_Boucle_for.ipynb index abb408c054376040ebcf3ac938f5c06bd82c7fda..026690e914b66f367577376f954c05168394fe6a 100644 --- a/Notebooks/02_Boucle_for.ipynb +++ b/Notebooks/02_Boucle_for.ipynb @@ -1,411 +1,411 @@ { "cells": [ { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-danger\"> \n \nAttention: **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\nPour reprendre votre travail, il suffit d'ouvrir le fichier .ipynb en cliquant sur *Fichier ouvrir*\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "Rappel de quelques fonction de Turtle avec des exemples qui pourront vous servir\n\n| Fonction |Exemple|Commentaire|\n|:-------- |:------|:----------|\n|forward(x)|forward(150)|Trace un trait de 150 points|\n|backward(x)|backward(150)|Trace un trait “à reculons” de 150 points|\n|left(n)|left(60)|Tourne sur place la tortue de 60° à gauche|\n|right(n)|right(60)|Tourne sur place la tortue de 60° à droite|\n|width(x)|width(5)|Change l’épaisseur à 5 points|\n|color(\"c\")|color(\"yellow\")|Change la couleur du trait (mais aucun trait n’est tracé à ce moment). Notez les guillemets !|\n|penup()|penup()|Lève la tortue (permet de se déplacer sans dessiner)|\n|pendown()|pendown()|Baisse le stylo|" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "# 2. Répéter - `for`\n\nDans ce chapitre, nous découvrons comment utiliser une boucle `for` pour répéter un bloc d'instructions un certain nombre de fois. Nous allons voir que :\n\n* la boucle `for` permet de répéter des instructions,\n* la structure `for _ in range(n):` permet de répéter un bloc un nombre `n` fois,\n* les instructions, qui sont répétées, sont celles qui suivent le `:` et qui sont indentées (décalées à droite). En effet, le langage python, n'a pas de end for pour indiquer la fin de la boucle. Le langage utilise l'indentation pour signifier qu'une suite d'instruction fait partie de la boucle.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\nUne boucle informatique est\n\nA) une instruction\nB) un passage ondulé\nC) une section de code répétée\nD) une protection thermique\nE) un cercle dessiné par \"Turtle\"\n```" }, { - "metadata": {}, "cell_type": "raw", + "metadata": {}, "source": "Ta réponse : " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse (Cliquer pour dévoiler)\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\n\nC) une section de code répétée\n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 2.1 La répétition\n\nRevenons vers un exemple simple : dessiner un carré.\n\nSi nous regardons le code de près, nous pouvons voir que nous répétons 4 fois les mêmes deux instructions `forward()` et `left()`.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "Ne serait-ce pas pratique de pouvoir dire à la tortue de répéter ces instructions 4 fois ?\nCeci est possible avec une boucle `for`. \n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 1 </h3>Transformez le carré en triangle.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(4):\n forward(100)\n left(90)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(4):\n forward(100)\n left(90)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class=\"alert alert-block alert-warning\"><b>A savoir:</b> \n \nPour distinguer les instructions qui seront répétées de celles qui ne le seront pas, on <b>indente</b> le code, c'est-à-dire que toutes les instructions qui suivent le `for` qui commencent par un espacement seront répétées le nombre de fois explicité dans le `range`. Après les répétitions le programme exécutera la permière instruction qui n'est pas indentée.\n\nNB: Vous être libre de choisir l'espace d'indentation mais soyez rigoureux avec votre choix et garder la même valeur pour tout votre programme. Nous utilisons en général un espace de 4 caractères ou la <b>touche Tabulation</b> pour rendre les codes plus lisibles.\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\n\nUne indentation de texte est\n\nA) un décalage vers la gauche\nB) un décalage vers la droite\nC) une mise en paragraphe\nD) une mise en sous-section\n```" }, { - "metadata": {}, "cell_type": "raw", + "metadata": {}, "source": "Ta réponse : " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse (Cliquer pour dévoiler)\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\n\nB) un décalage vers la droite\n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\nAvez-vous compris la notion d'indentation ?\nDans l'exemple ci-dessous (juste après la question/réponses) combien de fois le texte \"Au revoir\" va être affiché ?\nEssayer de répondre puis exécuter le programme qui suit pour vérifier votre réponse\n\nA) 0 fois\nB) 1 fois\nC) 5 fois\nD) le code fera une une erreur à cause de l'indentation dans la boucle for\n```" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "# Dans cette exemple l'instruction B ne fait pas partie de la boucle.\n\nfor _ in range(5):\n print(\"Hello\")\n print(\"----------\")\nprint(\"Au revoir\")", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "# Dans cette exemple l'instruction B ne fait pas partie de la boucle.\n\nfor _ in range(5):\n print(\"Hello\")\n print(\"----------\")\nprint(\"Au revoir\")" }, { - "metadata": {}, "cell_type": "raw", + "metadata": {}, "source": "Ta réponse : " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse (Cliquer pour dévoiler)\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\n\nB) 1 fois\n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 2.3 Faire des figures avec les boucles\n\n### Polygone régulier\nAvec une boucle `for`, nous pouvons simplifier le dessin des formes symétriques." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 2 </h3>\n\n1. Utiliser une boucle pour réécrire le programme ci-dessous " }, { + "cell_type": "code", + "execution_count": null, "metadata": { "scrolled": true, "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "2. Quelle est la figure dessinée ?" }, { - "metadata": {}, "cell_type": "raw", + "metadata": {}, "source": "Ta réponse : " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 3 </h3>\n\nCompléter le programme ci-dessous pour tracer un octogone. Un octogone régulier (mêmes longueur de côtés, mmêmes angles) est un polygone à huit sommets, donc huit côtés.\n\nLe programme doit faire moins de 5 lignes." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\n# à compléter\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\n# à compléter\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Escalier\n\nPour dessiner un escalier, il faut simplement répéter dans une boucle le dessin pour une seule marche.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(5):\n forward(20)\n left(90)\n forward(20)\n right(90)\n\nforward(100)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(5):\n forward(20)\n left(90)\n forward(20)\n right(90)\n\nforward(100)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "Pour dessiner des dents de scie, il faut simplement répéter dans une boucle le dessin pour une seule dent.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 4 </h3>\n\nDessinez une usine avec un toit en dents de scie.\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(4):\n left(45)\n forward(71)\n right(135)\n forward(50)\n left(90)\n\nforward(80)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(4):\n left(45)\n forward(71)\n right(135)\n forward(50)\n left(90)\n\nforward(80)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Éventail\n\nQue se passe-t-il si nous dessinons une ligne (`forward()`/`backward()`) et tournons chaque fois d'un petit angle ?\nC'est un peu comme un éventail qui s'ouvre.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 5 </h3>\n\nDoublez l'angle de rotation dans `left()`." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(18):\n forward(100)\n backward(100)\n left(10)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(18):\n forward(100)\n backward(100)\n left(10)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 6 </h3>\n\nQue se passe-t-il si nous avançons plus que nous reculons ?\nUne toute petite modification du programme peut faire une chouette différence.\n\nModifiez les valeurs dans `forward()` et `backward()`.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(18):\n forward(100)\n backward(90)\n left(20)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(18):\n forward(100)\n backward(90)\n left(20)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Étoile\n\nVoici une autre façon de toujours avancer, mais en tournant chaque fois d'un angle un peu plus petit que 180°.\nEssayons !\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 7 </h3>\n\nEssayez de changer le nombre de pics de l'étoile." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(9):\n forward(200)\n left(160)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(9):\n forward(200)\n left(160)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Cercle\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 8 </h3>\n\nCompléter la boucle for pour dessiner trois cercles rouge de rayon 50 collés les uns aux autres comme sur le dessin:\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "##### Rappels: \n\n- La fonction `circle(R, A)` permet de dessiner un arc de cercle de rayon `R` et d'angle `A`.\nExemple: `circle(100, 360)` dessine un cercle de rayon 100.\n- Les fonctions `penup()` et `pendown()` permettent de lever, respectivement baisser, le stylo.\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ncolor('red')\nfor _ in range(3):\n # a compléter\n\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ncolor('red')\nfor _ in range(3):\n # a compléter\n\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "\n## 2.4 Explorer \"La tortue\"\n\nVoici quelques fonctions de la tortue.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Estampe\n\nVous pouvez laisser une impression de la tortue à sa position actuelle avec la fonction `stamp()`.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\nshape('turtle')\n\nfor _ in range(6):\n forward(100)\n left(60)\n stamp()\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\nshape('turtle')\n\nfor _ in range(6):\n forward(100)\n left(60)\n stamp()\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Forme\n\nVous pouvez changer la forme de votre tortue avec la fonction `shape()`.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 9 </h3>Essayez les formes 'triangle', 'arrow', 'circle' et 'square'.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\nshape('turtle')\n\nfor _ in range(6):\n forward(100)\n left(60)\n stamp()\n\ndone()\n\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\nshape('turtle')\n\nfor _ in range(6):\n forward(100)\n left(60)\n stamp()\n\ndone()\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 2.5 Les erreurs\n\nIl est important de bien lire et comprendre les messages d'erreur.\nDans cette section, vous allez découvrir les différentes catégories d'erreur et comment les corriger.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### ImportError\n\nCette erreur survient lorsque vous essayez d'importer un module qui n'existe pas.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 10 </h3>\n\n1. Corrigez l'erreur d'importation.\n2. Testez le programme pour vérifier qu'il fonctionne." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtl import *\n\nfor i in range(3):\n forward(100)\n left(120)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtl import *\n\nfor i in range(3):\n forward(100)\n left(120)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### <font color='red'>SyntaxError</font>\n\nCette erreur survient lorsque vous écrivez mal un mot-clé, ou si vous oubliez une ponctuation. Dans ce cas, le mot-clé mal écrit n'est pas reconnu et il n'est pas colorié correctement dans votre code.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 11 </h3>Corrigez les trois erreurs de syntaxe et remarquez les éventuelles différences de stylisation.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "fro turtle import *\n\nfore i in range(3)\n forward(100)\n left(120)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "fro turtle import *\n\nfore i in range(3)\n forward(100)\n left(120)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### <font color='red'>NameError</font>\n\nCette erreur survient lorsque vous écrivez mal le nom d'une variable ou fonction.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 12 </h3>Corrigez les trois erreurs de nom.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range():\n forwarde(100)\n lefft(120)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range():\n forwarde(100)\n lefft(120)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### <font color='red'>TypeError</font>\n\nCette erreur survient lorsque vous ne mettez pas le nombre d'arguments corrects pour une fonction.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 13 </h3>Corrigez les trois erreurs de type.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range():\n forward()\n left(100, 120)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range():\n forward()\n left(100, 120)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Exercices d'entraînement " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 14 </h3>\n\nRéécrire le code suivant en remplaçant par une boucle `for` partout où c’est possible.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(20)\nright(40)\nforward(20)\nright(40)\nforward(20)\nright(40)\nforward(20)\nright(40)\nforward(-40)\nleft(30)\nforward(-40)\nleft(30)\nforward(20)\nright(40)\nforward(20)\nright(40)\nforward(-40)\nleft(30)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(20)\nright(40)\nforward(20)\nright(40)\nforward(20)\nright(40)\nforward(20)\nright(40)\nforward(-40)\nleft(30)\nforward(-40)\nleft(30)\nforward(20)\nright(40)\nforward(20)\nright(40)\nforward(-40)\nleft(30)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 15 </h3>\n\nUtiliser votre identifiant EEL et le mot de passe *Sismondi2024* pour faire les exercices de la **série B** de la plateforme [AlgoPython](https://www.algopython.fr/login). [](https://www.algopython.fr/login)\n\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "---\n\n#### Remarque générale\n\nCe document est une adaptation d'un ressource pédagogique tiré du catalogue modulo https://modulo-info.ch/. Il est sous license Creative Commons [BY-NC-SA](https://creativecommons.org/licenses/?lang=fr)\n\n" } ], diff --git a/Notebooks/02_Boucle_for_avec_solution.ipynb b/Notebooks/02_Boucle_for_avec_solution.ipynb index de075e54ba8f2fe7b690bb4527fd98f1f14b73bf..6a6159f77f54d6d4a25651f43c370230311c9a82 100644 --- a/Notebooks/02_Boucle_for_avec_solution.ipynb +++ b/Notebooks/02_Boucle_for_avec_solution.ipynb @@ -1,546 +1,546 @@ { "cells": [ { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-danger\"> \n \n# Cours avec solution\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### A faire avant de commençer\n**Cliquez sur Exécuter tout** dans le menu **Cellule**.\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "# 2. Répéter - `for`\n\nDans ce chapitre, nous découvrons comment utiliser une boucle `for` pour répéter un bloc d'instructions un certain nombre de fois. Nous allons voir que :\n\n* la boucle `for` permet de répéter des instructions,\n* la structure `for _ in range(n):` permet de répéter un bloc un nombre `n` fois,\n* les instructions, qui sont répétées, sont celles qui suivent le `:` et qui sont indentées (décalées à droite). En effet, le langage python, n'a pas de end for pour indiquer la fin de la boucle. Le langage utilise l'indentation pour signifier qu'une suite d'instruction fait partie de la boucle.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\nUne boucle informatique est\n\nA) une instruction\nB) un passage ondulé\nC) une section de code répétée\nD) une protection thermique\nE) un cercle dessiné par \"Turtle\"\n```" }, { - "metadata": {}, "cell_type": "raw", + "metadata": {}, "source": "Ta réponse : " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse (Cliquer pour dévoiler)\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\n\nC) une section de code répétée\n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 2.1 La répétition\n\nRevenons vers un exemple simple : dessiner un carré.\n\nSi nous regardons le code de près, nous pouvons voir que nous répétons 4 fois les mêmes deux instructions `forward()` et `left()`.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\nforward(100)\nleft(90)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "Ne serait-ce pas pratique de pouvoir dire à la tortue de répéter ces instructions 4 fois ?\nCeci est possible avec une boucle `for`. \n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 1 </h3>Transformez le carré en triangle.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "```Python\nfrom turtle import *\n\nfor _ in range(4):\n forward(100)\n left(90)\n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(3):\n forward(100)\n left(120)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(3):\n forward(100)\n left(120)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class=\"alert alert-block alert-warning\"><b>A savoir:</b> \n \nPour distinguer les instructions qui seront répétées de celles qui ne le seront pas, on <b>indente</b> le code, c'est-à-dire que toutes les instructions qui suivent le `for` qui commencent par un espacement seront répétées le nombre de fois explicité dans le `range`. Après les répétitions le programme exécutera la permière instruction qui n'est pas indentée.\n\nNB: Vous être libre de choisir l'espace d'indentation mais soyez rigoureux avec votre choix et garder la même valeur pour tout votre programme. Nous utilisons en général un espace de 4 caractères ou la <b>touche Tabulation</b> pour rendre les codes plus lisibles.\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\n\nUne indentation de texte est\n\nA) un décalage vers la gauche\nB) un décalage vers la droite\nC) une mise en paragraphe\nD) une mise en sous-section\n```" }, { - "metadata": {}, "cell_type": "raw", + "metadata": {}, "source": "Ta réponse : " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse (Cliquer pour dévoiler)\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\n\nB) un décalage vers la droite\n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\nAvez-vous compris la notion d'indentation ?\nDans l'exemple ci-dessous (juste après la question/réponses) combien de fois le texte \"Au revoir\" va être affiché ?\nEssayer de répondre puis exécuter le programme qui suit pour vérifier votre réponse\n\nA) 0 fois\nB) 1 fois\nC) 5 fois\nD) le code fera une une erreur à cause de l'indentation dans la boucle for\n```" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "# Dans cette exemple l'instruction B ne fait pas partie de la boucle.\n\nfor _ in range(5):\n print(\"Hello\")\n print(\"----------\")\nprint(\"Au revoir\")", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "# Dans cette exemple l'instruction B ne fait pas partie de la boucle.\n\nfor _ in range(5):\n print(\"Hello\")\n print(\"----------\")\nprint(\"Au revoir\")" }, { - "metadata": {}, "cell_type": "raw", + "metadata": {}, "source": "Ta réponse : " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse (Cliquer pour dévoiler)\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\n\nB) 1 fois\n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 2.3 Faire des figures avec les boucles\n\n### Polygone régulier\nAvec une boucle `for`, nous pouvons simplifier le dessin des formes symétriques." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 2 </h3>\n\n1. Utiliser une boucle pour réécrire le programme ci-dessous " }, { + "cell_type": "markdown", "metadata": { "scrolled": true }, - "cell_type": "markdown", "source": "```Python\nfrom turtle import *\n\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\nforward(100)\nleft(60)\n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "scrolled": true, "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(6):\n forward(100)\n left(60)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(6):\n forward(100)\n left(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "2. Quelle est la figure dessinée ?" }, { - "metadata": {}, "cell_type": "raw", + "metadata": {}, "source": "Ta réponse : C'est un hexagone." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 3 </h3>\n\nCompléter le programme ci-dessous pour tracer un octogone. Un octogone régulier (mêmes longueur de côtés, mmêmes angles) est un polygone à huit sommets, donc huit côtés.\n\nLe programme doit faire moins de 5 lignes." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "```Python\nfrom turtle import *\n\n# à compléter\n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\n\nfor _ in range(8):\n forward(70)\n left(45)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\n\nfor _ in range(8):\n forward(70)\n left(45)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Escalier\n\nPour dessiner un escalier, il faut simplement répéter dans une boucle le dessin pour une seule marche.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(5):\n forward(20)\n left(90)\n forward(20)\n right(90)\n\nforward(100)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(5):\n forward(20)\n left(90)\n forward(20)\n right(90)\n\nforward(100)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "Pour dessiner des dents de scie, il faut simplement répéter dans une boucle le dessin pour une seule dent.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 4 </h3>\n\nDessinez une usine avec un toit en dents de scie.\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "```Python\nfrom turtle import *\n\nfor _ in range(4):\n left(45)\n forward(71)\n right(135)\n forward(50)\n left(90)\n\nforward(80)\n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\nwidth(3)\nfor _ in range(6):\n left(45)\n forward(71)\n right(135)\n forward(50)\n left(90)\n\nright(90)\nforward(100)\nright(90)\nforward(50*6)\nright(90)\nforward(100)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\nwidth(3)\nfor _ in range(6):\n left(45)\n forward(71)\n right(135)\n forward(50)\n left(90)\n\nright(90)\nforward(100)\nright(90)\nforward(50*6)\nright(90)\nforward(100)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Éventail\n\nQue se passe-t-il si nous dessinons une ligne (`forward()`/`backward()`) et tournons chaque fois d'un petit angle ?\nC'est un peu comme un éventail qui s'ouvre.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 5 </h3>\n\nDoublez l'angle de rotation dans `left()`." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "```Python\nfrom turtle import *\n\nfor _ in range(18):\n forward(100)\n backward(100)\n left(10)\n\ndone()\n```Python" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(18):\n forward(100)\n backward(100)\n left(20)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(18):\n forward(100)\n backward(100)\n left(20)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 6 </h3>\n\nQue se passe-t-il si nous avançons plus que nous reculons ?\nUne toute petite modification du programme peut faire une chouette différence.\n\nModifiez les valeurs dans `forward()` et `backward()`.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(18):\n forward(130)\n backward(90)\n left(20)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(18):\n forward(130)\n backward(90)\n left(20)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Étoile\n\nVoici une autre façon de toujours avancer, mais en tournant chaque fois d'un angle un peu plus petit que 180°.\nEssayons !\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 7 </h3>\n\nEssayez de changer le nombre de pics de l'étoile." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "```Python\nfrom turtle import *\n\nfor _ in range(9):\n forward(200)\n left(160)\n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "Premièrement pour ce type d'étoile, il faut que le nombre de sommet soit impair sinon le nombre de trait ne peut pas être égal au nombre de sommets.\n\nPour trouver l'angle on peut utiliser le théorème de l'angle au centre. En effet, si il y a $n$ pics, alors l'angle au centre sera de $\\frac{360°}{n}$ donc l'angle interne de chaque pic est des $\\frac{\\frac{360°}{n}}{2}=\\frac{180°}{n}$ donc après chque sommet la tortue devra tourner de $180°-\\frac{180°}{n}$" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nspeed(10)\nfor _ in range(17):\n forward(200)\n left(180-180/17)\n\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nspeed(10)\nfor _ in range(17):\n forward(200)\n left(180-180/17)\n\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Cercle\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 8 </h3>\n\nCompléter la boucle for pour dessiner trois cercles rouge de rayon 50 collés les uns aux autres comme sur le dessin:\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "```Python\nfrom turtle import *\n\ncolor('red')\nfor _ in range(3):\n # a ompléter\n \n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "##### Rappel: \n\n\nLa fonction `circle(R, A)` permet de dessiner un arc de cercle de rayon `R` et d'angle `A`.\n\nExemple: `circle(100, 360)` dessine un cercle de rayon 100.\n\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ncolor('red')\nfor _ in range(3):\n circle(50, 360)\n penup()\n forward(100)\n pendown()\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ncolor('red')\nfor _ in range(3):\n circle(50, 360)\n penup()\n forward(100)\n pendown()\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 2.4 Explorer \"La tortue\"\n\nVoici quelques fonctions de la tortue.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Estampe\n\nVous pouvez laisser une impression de la tortue à sa position actuelle avec la fonction `stamp()`.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\nshape('turtle')\n\nfor _ in range(6):\n forward(100)\n left(60)\n stamp()\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\nshape('turtle')\n\nfor _ in range(6):\n forward(100)\n left(60)\n stamp()\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Forme\n\nVous pouvez changer la forme de votre tortue avec la fonction `shape()`.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 9 </h3>Essayez les formes 'triangle', 'arrow', 'circle' et 'square'.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\nshape('triangle')\n\nfor _ in range(6):\n forward(100)\n left(60)\n stamp()\n\ndone()\n\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\nshape('triangle')\n\nfor _ in range(6):\n forward(100)\n left(60)\n stamp()\n\ndone()\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## 2.5 Les erreurs\n\nIl est important de bien lire et comprendre les messages d'erreur.\nDans cette section, vous allez découvrir les différentes catégories d'erreur et comment les corriger.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### ImportError\n\nCette erreur survient lorsque vous essayez d'importer un module qui n'existe pas.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 10 </h3>\n\n1. Corrigez l'erreur d'importation.\n2. Testez le programme pour vérifier qu'il fonctionne." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "```Python\nfrom turtl import *\n\nfor i in range(3):\n forward(100)\n left(120)\n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor i in range(3):\n forward(100)\n left(120)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor i in range(3):\n forward(100)\n left(120)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### <font color='red'>SyntaxError</font>\n\nCette erreur survient lorsque vous écrivez mal un mot-clé, ou si vous oubliez une ponctuation. Dans ce cas, le mot-clé mal écrit n'est pas reconnu et il n'est pas colorié correctement dans votre code.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 11 </h3>Corrigez les trois erreurs de syntaxe et remarquez les éventuelles différences de stylisation.\n\n" }, { + "cell_type": "markdown", "metadata": { "trusted": true }, - "cell_type": "markdown", "source": "```Python\nfro turtle import *\n\nfore i in range(3)\n forward(100)\n left(120)\n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor i in range(3):\n forward(100)\n left(120)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor i in range(3):\n forward(100)\n left(120)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### <font color='red'>NameError</font>\n\nCette erreur survient lorsque vous écrivez mal le nom d'une variable ou fonction.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 12 </h3>Corrigez les trois erreurs de nom.\n\n" }, { + "cell_type": "markdown", "metadata": { "trusted": true }, - "cell_type": "markdown", "source": "```Python\nfrom turtle import *\n\nfor _ in range(n):\n forwarde(100)\n lefft(120)\n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(4):\n forward(100)\n left(120)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(4):\n forward(100)\n left(120)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### <font color='red'>TypeError</font>\n\nCette erreur survient lorsque vous ne mettez pas le nombre d'arguments corrects pour une fonction.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 13 </h3>Corrigez les trois erreurs de type.\n\n" }, { + "cell_type": "markdown", "metadata": { "trusted": true }, - "cell_type": "markdown", "source": "```Python\nfrom turtle import *\n\nfor _ in range():\n forward()\n left(100, 120)\n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(3):\n forward(100)\n left(120)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(3):\n forward(100)\n left(120)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Exercices d'entraînement " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 14 </h3>\n\nRéécrire le code suivant en remplaçant par une boucle `for` partout où c’est possible.\n\n" }, { + "cell_type": "markdown", "metadata": { "trusted": true }, - "cell_type": "markdown", "source": "```Python\nfrom turtle import *\n\nforward(20)\nright(40)\nforward(20)\nright(40)\nforward(20)\nright(40)\nforward(20)\nright(40)\nforward(-40)\nleft(30)\nforward(-40)\nleft(30)\nforward(20)\nright(40)\nforward(20)\nright(40)\nforward(-40)\nleft(30)\n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(4)\n forward(20)\n right(40)\n\nfor _ in range(2)\n forward(-40)\n left(30)\n\nfor _ in range(2) \n forward(20)\n right(40)\n\nforward(-40)\nleft(30)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(4)\n forward(20)\n right(40)\n\nfor _ in range(2)\n forward(-40)\n left(30)\n\nfor _ in range(2) \n forward(20)\n right(40)\n\nforward(-40)\nleft(30)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 15 </h3>\n\nUtiliser votre identifiant EEL et le mot de passe *Sismondi2024* pour faire les exercices de la **série B** de la plateforme [AlgoPython](https://www.algopython.fr/login). [](https://www.algopython.fr/login)\n\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "---\n\n#### Remarque générale\n\nCe document est une adaptation d'un ressource pédagogique tiré du catalogue modulo https://modulo-info.ch/. Il est sous license Creative Commons [BY-NC-SA](https://creativecommons.org/licenses/?lang=fr)\n\n" } ], diff --git a/Notebooks/02b_Complement_sur_les_cercles.ipynb b/Notebooks/02b_Complement_sur_les_cercles.ipynb index 11f2102790f3c44609627007ca0566156a7b966e..691e66c73e770522c8fe4c04a62f26b9022ffdcf 100644 --- a/Notebooks/02b_Complement_sur_les_cercles.ipynb +++ b/Notebooks/02b_Complement_sur_les_cercles.ipynb @@ -1,175 +1,175 @@ { "cells": [ { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-danger\"> \n \nAttention: **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\nPour reprendre votre travail, il suffit d'ouvrir le fichier .ipynb en cliquant sur *Fichier ouvrir*\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "# Complément sur les cercles\n\n**Rappel** :\n\n- la fonction `circle(r)` dessine un cercle de rayon `r`, vers la gauche,\n- la fonction `circle(-r)` dessine un cercle de rayon `r`, vers la droite,\n- la fonction `circle(r, a)` dessine un arc de cercle de rayon `r` avec un angle `a`.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Fonction `circle()`\n\nLa fonction `circle(r)` dessine un cercle de rayon `r`.\nCe cercle est dessiné :\n\n- vers la gauche si `r` est positif,\n- vers la droite si `r` est négatif.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "**Rappel** de quelques fonction Turtle avec des exemples qui pourront vous servir\n\n| Fonction |Exemple|Commentaire|\n|:-------- |:------|:----------|\n|forward(x)|forward(150)|Trace un trait de 150 points|\n|backward(x)|backward(150)|Trace un trait “à reculons” de 150 points|\n|left(n)|left(60)|Tourne sur place la tortue de 60° à gauche|\n|right(n)|right(60)|Tourne sur place la tortue de 60° à droite|\n|width(x)|width(5)|Change l’épaisseur à 5 points|\n|color(\"c\")|color(\"yellow\")|Change la couleur du trait (mais aucun trait n’est tracé à ce moment). Notez les guillemets !|\n|penup()|penup()|Lève la tortue (permet de se déplacer sans dessiner)|\n|pendown()|pendown()|Baisse le stylo|" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nleft(90)\ncircle(20)\ncircle(40)\ncircle(60)\ncircle(80)\n\ncircle(-20)\ncircle(-40)\ncircle(-60)\ncircle(-80)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nleft(90)\ncircle(20)\ncircle(40)\ncircle(60)\ncircle(80)\n\ncircle(-20)\ncircle(-40)\ncircle(-60)\ncircle(-80)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Fleur\n\nDessinons des cercles dans une boucle, et tournons chaque fois.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 1 </h3>Modifiez le nombre de répétitions et l'angle de rotation.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(6):\n circle(50)\n left(60)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(6):\n circle(50)\n left(60)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Arc de cercle\n\nCette fonction peut avoir un deuxième paramètre sous la forme `circle(r, angle)`,\noù `angle` représente l'angle de l'arc de cercle dessiné.\nPar défaut, l'angle est de 360°, donc un cercle entier.\n\nVoici un exemple qui utilise deux demi-cercles de 180°.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 2 </h3>\n\nDessinez un bonhomme de neige et utilisez `dot()` pour les yeux.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(100)\ncircle(40, 180)\nforward(50)\ncircle(-30)\nforward(50)\ncircle(40, 180)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(100)\ncircle(40, 180)\nforward(50)\ncircle(-30)\nforward(50)\ncircle(40, 180)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Carré arrondi\n\nAvec la fonction `circle()`, il est maintenant possible de dessiner un carré dont les coins sont arrondis.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 3 </h3>Dessinez maintenant un rectangle avec des coins arrondis.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(4):\n forward(100)\n circle(20, 90)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(4):\n forward(100)\n circle(20, 90)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Pac-Man\n\nPac-Man est un jeu vidéo créé par l’entreprise japonaise Namco, sorti au Japon en 1980. Le jeu consiste à déplacer Pac-Man, un personnage qui ressemble à un diagramme circulaire à l’intérieur d’un labyrinthe, afin de lui faire manger toutes les pac-gommes qui s’y trouvent en évitant d’être touchées par des fantômes.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 4 </h3>Ajoutez l'œil de Pac-Man, et les points qu'il mange.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfillcolor('yellow')\nbegin_fill()\nleft(30)\nforward(100)\nleft(90)\ncircle(100, 300)\nleft(90)\nforward(100)\nend_fill()\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfillcolor('yellow')\nbegin_fill()\nleft(30)\nforward(100)\nleft(90)\ncircle(100, 300)\nleft(90)\nforward(100)\nend_fill()\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Cœur\n\nLe cœur est le symbole de l'amour : on donne de façon métaphorique son cœur à la personne que l'on aime pour lui signifier qu'on lui confie sa vie.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 5 </h3>Coloriez le cœur en rouge, ajoutez une flèche.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\nr = 50\n\nleft(90)\ncircle(r, 225)\nforward(2.4*r)\nleft(90)\nforward(2.4*r)\ncircle(r, 225)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\nr = 50\n\nleft(90)\ncircle(r, 225)\nforward(2.4*r)\nleft(90)\nforward(2.4*r)\ncircle(r, 225)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Infini — ∞\n\nLe mot **infini** (du latin in-, préfixe négatif, et finitus, *limité*) est un adjectif servant à qualifier quelque chose qui n'a pas de limite en nombre ou en taille. L'infini est représenté par le symbole ∞. Nous allons le dessiner.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 6 </h3>Augmentez un des rayons à `2*r` et ajustez la longueur des segments droits.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nright(45)\nforward(50)\ncircle(50, 270) # aumentez le rayon à 2*r\nforward(2*50)\ncircle(-50, 270)\nforward(50)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nright(45)\nforward(50)\ncircle(50, 270) # aumentez le rayon à 2*r\nforward(2*50)\ncircle(-50, 270)\nforward(50)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Bretzel - ⌘\n\nLe pictogramme ⌘ (Unicode 2318), parfois appelé *Gordon loop* ou *bretzel*, a été dessiné par Susan Kare lors de la création du premier Macintosh pour sa touche de commande. Il sert de préfixe à d'autres touches pour construire des raccourcis tels que :\n\n- ⌘-X pour couper\n- ⌘-C pour copier\n- ⌘-V pour coller\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 7 </h3>Modifiez le bretzel pour avoir 3 ou 4 boucles.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(4):\n circle(40, 270)\n forward(3*40)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(4):\n circle(40, 270)\n forward(3*40)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "\n \n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "---\n\n#### Remarque générale\n\nCe document est une adaptation d'un ressource pédagogique tiré du catalogue modulo https://modulo-info.ch/. Il est sous license Creative Commons [BY-NC-SA](https://creativecommons.org/licenses/?lang=fr)\n\n\n " } ], diff --git a/Notebooks/03_fonction_simple.ipynb b/Notebooks/03_fonction_simple.ipynb index a9a618203cacb92bb013a8ae656645d3a809eed6..fa4c2bc977e31158c8f67448d2d43ac7de3eae28 100644 --- a/Notebooks/03_fonction_simple.ipynb +++ b/Notebooks/03_fonction_simple.ipynb @@ -1,428 +1,428 @@ { "cells": [ { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-danger\"> \n \nAttention: **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\nPour reprendre votre travail, il suffit d'ouvrir le fichier .ipynb en cliquant sur *Fichier ouvrir*\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "# Le fonctions simples" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "Rappel de quelques fonction de Turtle avec des exemples qui pourront vous servir\n\n| Fonction |Exemple|Commentaire|\n|:-------- |:------|:----------|\n|forward(x)|forward(150)|Trace un trait de 150 points|\n|backward(x)|backward(150)|Trace un trait “à reculons” de 150 points|\n|left(n)|left(60)|Tourne sur place la tortue de 60° à gauche|\n|right(n)|right(60)|Tourne sur place la tortue de 60° à droite|\n|width(x)|width(5)|Change l’épaisseur à 5 points|\n|color(\"c\")|color(\"yellow\")|Change la couleur du trait (mais aucun trait n’est tracé à ce moment). Notez les guillemets !|\n|penup()|penup()|Lève la tortue (permet de se déplacer sans dessiner)|\n|pendown()|pendown()|Baisse le stylo|\n|circle(R, A)|circle(100, 180)|Dessine un demi-cercle (angle de 180°) de rayon 100 points|\n|stamp()|stamp()|Laisse une impression de la tortue à sa position actuelle|\n|shape(forme)|shape('circle')|Change la forme de la tortue|" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "# Définir - `def`\n\nDans ce chapitre, nous allons découvrir comment augmenter le vocabulaire de notre langage de programmation en définissant de nouvelles instructions, qu'on appelle aussi **fonction**. Ceci permet de rendre un code plus compact, mais surtout plus lisible. Nous allons voir que :\n\n- le mot-clé `def` permet de nommer (définir) une séquence,\n- le bloc qui suit doit être en **indentation** (décalé à droite)," }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\nUne fonction permet de\n\nA) donner un nom à une séquence\nB) augmenter le vocabulaire du langage de programmation\nC) nous dire si ça fonctionne\nD) rendre un programme plus lisible\n```" }, { - "metadata": {}, "cell_type": "raw", + "metadata": {}, "source": "Ta réponse : " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\nA) donner un nom à une séquence\n\nB) augmenter le vocabulaire du langage de programmation\n\nD) rendre un programme plus lisible\n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Nommer une séquence\n\nDessiner un rectangle est assez utile. C'est une forme qu'on pourra réutiliser certainement souvent. Il serait pratique de définir un nom pour ces 8 lignes de code. Pouvons-nous définir de nouvelles commandes ?\n```Python\nforward(160)\nleft(90)\nforward(100)\nleft(90)\nforward(160)\nleft(90)\nforward(100)\nleft(90)\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "Oui, c'est possible. Avec le mot-clé `def`, nous pouvons définir une nouvelle commande que nous pouvons par exemple appeler `rectangle()`.\nCette façon de créer un raccourci est appelée **définir** une fonction.\nLe code à exécuter suit l'expression `def rectangle():` et se trouve en **indentation** (décalé vers la droite).\n\nEnsuite, il suffit d'écrire `rectangle()` pour dessiner un rectangle. On appelle ceci **appeler** une fonction.\nRappelez-vous ceci :\n\n- on définit une fonction une seule fois,\n- on appelle une fonction autant de fois que l'on veut,\n- si on ne l'appelle pas, elle n'est pas exécutée et il ne se passe rien.\n\nDéfinir une fonction nous permet de réduire le nombre de lignes de code nécessaires.\nChaque fois que nous utilisons `rectangle()`,\nau lieu d'écrire 8 lignes, nous écrivons seulement une ligne de code." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 1 </h3>\n\nDessinez encore d'autres rectangles en appelant la nouvelle fonction `rectangle()`.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef rectangle():\n forward(160)\n left(90)\n forward(100)\n left(90)\n forward(160)\n left(90)\n forward(100)\n left(90)\n\nrectangle()\nleft(90)\nrectangle()\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef rectangle():\n forward(160)\n left(90)\n forward(100)\n left(90)\n forward(160)\n left(90)\n forward(100)\n left(90)\n\nrectangle()\nleft(90)\nrectangle()\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\nRappel: Une indentation de texte est\n\nA) un décalage vers la gauche\nB) un décalage vers la droite\nC) une mise en paragraphe\nD) une mise en sous-section\n```" }, { - "metadata": {}, "cell_type": "raw", + "metadata": {}, "source": "Ta réponse : " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\nB) un décalage vers la droite\n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Donner du sens\n\nUne fonction ne permet pas seulement d'économiser des lignes de code.\nElle permet aussi de structurer le code et de lui donner un sens. Considérez par exemple le code ci-dessous. Il est presque impossible de comprendre ce que fait le programme en regardant les 17 lignes de code.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(30)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(30)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "Si nous observons la tortue, nous comprenons finalement qu'elle dessine deux fois un rectangle. Nous pouvons même interpréter cette image et donner le sens de bâtiment au premier rectangle, et de porte au second.\n\nEssayons maintenant de découper le code en **sous-programmes** en utilisant deux fonctions `batiment()` et `porte()`.\nEn regardant ces 3 lignes de code, on comprend immédiatement le sens du programme.\n\n``` python\nbatiment()\nforward(30) # repositionner la tortue\nporte()\n```\n\nLa définition d'une fonction permet d'ajouter de nouveaux mots à un langage de programmation. Contrairement aux commandes natives de Python qui sont toutes en anglais, nous sommes libres de les choisir en français.\n\n**Attention** : écrivez les fonctions sans accents et sans circonflexes : `batiment()`, `carre()`, `boite()`.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 2 </h3>Ajoutez une deuxième porte au bâtiment. Ensuite, faites-en une porte double.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef batiment():\n forward(200)\n left(90)\n forward(100)\n left(90)\n forward(200)\n left(90)\n forward(100)\n left(90)\n\ndef porte():\n forward(30)\n left(90)\n forward(50)\n left(90)\n forward(30)\n left(90)\n forward(50)\n left(90)\n\nbatiment()\nforward(30)\nporte()\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef batiment():\n forward(200)\n left(90)\n forward(100)\n left(90)\n forward(200)\n left(90)\n forward(100)\n left(90)\n\ndef porte():\n forward(30)\n left(90)\n forward(50)\n left(90)\n forward(30)\n left(90)\n forward(50)\n left(90)\n\nbatiment()\nforward(30)\nporte()\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n\nÀ combien de lignes de code la fonction `porte()` est-elle équivalente ?\n\n\n```\nA) 1 ligne\nB) 2 lignes\nC) 8 lignes\nD) 17 lignes\n```" }, { - "metadata": {}, "cell_type": "raw", + "metadata": {}, "source": "Ta réponse : " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\nC) 8 lignes\n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Définir une fonction\n\nLe fait de donner un nom à une séquence d'instructions est appelé **définir une fonction**. Une **définition de fonction** comporte :\n\n1. le mot-clé `def` (définir),\n1. le nom de la fonction (`batiment/porte`),\n1. les parenthèses `()`,\n1. le deux-points `:`,\n1. un bloc en indentation.\n\nQu'est-ce qu'un bloc en indentation ?\nC'est un bloc de texte qui comporte des espaces vides à gauche. En Python, ces espaces apparaissent en multiples de 4.\n\nL'indentation est très importante en Python. C'est l'indentation qui indique l'étendue des instructions qui font partie de la fonction.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\nParmi les 4 définitions de fonction ci-dessous, laquelle est correcte ?\n\nA) def() rectangle:\nB) def: rectangle\nC) def rectangle():\nD) def(rectangle):\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\nC) def rectangle():\n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Indenter avec un raccourci\n\nComme l'indentation est tellement importante en Python, il en existe un raccourci.\nIl faut d'abord sélectionner **les lignes** de code dont vous voulez changer l'indentation.\nEnsuite, vous appuyez sur :\n\n- la touche **tab** pour augmenter l'indentation\n- la touche **maj+tab** pour diminuer l'indentation\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 3 </h3>\n\nEssayez ces raccourcis dans le code ci-dessous. Transformez le code en deux fonctions `batiment()` et `porte()`, que vous appelez ensuite.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(30)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(30)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "Voici encore un raccourci très utile : **maj(ou Shift)+Enter** pour exécuter le code.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Maison avec porte\n\nUne fois qu'une fonction est définie, elle peut être utilisée partout, même dans la définition d'une autre fonction.\n\nIci, nous avons une fonction `porte()`, qui est utilisée à l'intérieur d'une deuxième fonction `maison()`. Pour que ceci soit possible, la définition de porte doit être placée avant la définition de `maison()`.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 4 </h3>Déplacez la porte vers le milieu de la maison, et dessinez une deuxième maison à coté.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef porte():\n forward(20)\n left(90)\n forward(40)\n left(90)\n forward(20)\n left(90)\n forward(40)\n left(90)\n\ndef maison():\n forward(100)\n left(90)\n forward(60)\n left(45)\n forward(71)\n left(90)\n forward(71)\n left(45)\n forward(60)\n left(90)\n porte()\n\nmaison()\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef porte():\n forward(20)\n left(90)\n forward(40)\n left(90)\n forward(20)\n left(90)\n forward(40)\n left(90)\n\ndef maison():\n forward(100)\n left(90)\n forward(60)\n left(45)\n forward(71)\n left(90)\n forward(71)\n left(45)\n forward(60)\n left(90)\n porte()\n\nmaison()\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Plus sur \"La tortue\"\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Le point `dot()`\n\nLa fonction `dot()` dessine un point à la position actuelle de la tortue." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 5 </h3>\n\nAjoutez un point (`dot`) au sommet du triangle.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef triangle():\n dot()\n forward(100)\n left(120)\n dot()\n forward(100)\n left(120)\n forward(100)\n\ntriangle()\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef triangle():\n dot()\n forward(100)\n left(120)\n dot()\n forward(100)\n left(120)\n forward(100)\n\ntriangle()\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Lever le stylo\n\nLes deux commandes `up()` et `down()` permettent de lever et de baisser le stylo.\nCeci nous permet de dessiner des formes séparées, comme ici le petit i avec son point.\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 6 </h3>Transformez le i vers un i avec trema (deux points).\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef i():\n dot()\n pendown() # poser le stylo\n left(90)\n forward(50)\n penup() # lever le stylo\n forward(50)\n dot()\n backward(2*50)\n right(90)\n forward(50/2) # avancer à la prochaine lettre\n\ni()\ni()\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef i():\n dot()\n pendown() # poser le stylo\n left(90)\n forward(50)\n penup() # lever le stylo\n forward(50)\n dot()\n backward(2*50)\n right(90)\n forward(50/2) # avancer à la prochaine lettre\n\ni()\ni()\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Exercices d'entraînement\n\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 7 </h3>\n\nCompléter le programme ci-dessous en ajoutant des appels à la fonction `forme_mystere()` pour pour créer le dessin suivant:\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "# permet d'utiliser les fonctions pour dessiner\nfrom turtle import *\n\n# Définition de la fonction mystère\ndef forme_mystere():\n for _ in range(4):\n forward(100)\n right(90)\n\n\nforme_mystere()\n# à compléter \n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "# permet d'utiliser les fonctions pour dessiner\nfrom turtle import *\n\n# Définition de la fonction mystère\ndef forme_mystere():\n for _ in range(4):\n forward(100)\n right(90)\n\n\nforme_mystere()\n# à compléter \n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 8 </h3>\n\n1. Testez le programme suivant." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "# permet d'utiliser les fonctions pour dessiner\nfrom turtle import *\n\n# Code à factoriser\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "# permet d'utiliser les fonctions pour dessiner\nfrom turtle import *\n\n# Code à factoriser\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "2. Définissez une fonction `hexagone()` qui permet de tracer des hexagones et utilisez-là pour réduire le nombre d’instructions du programme précédent. En utilisant une boucle `for` avec `hexagone()`, votre programme ne devrait pas dépasser 10 lignes." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "# permet d'utiliser les fonctions pour dessiner\nfrom turtle import *\n\ndef #a compléter\n #a compléter\n\n#a compléter\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "# permet d'utiliser les fonctions pour dessiner\nfrom turtle import *\n\ndef #a compléter\n #a compléter\n\n#a compléter\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 9 </h3>\n\nTestez le programme ci-dessous, puis modifiez le en définissant au début une fonction `carre100()` qui dessine un carré de longueur 100 afin d'obtenir un programme structuré sans répétition inutile." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\n\nfor _ in range(4):\n forward(100)\n left(90)\n\n\nleft(180)\n\n\nfor _ in range(4):\n forward(100)\n left(90)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\n\nfor _ in range(4):\n forward(100)\n left(90)\n\n\nleft(180)\n\n\nfor _ in range(4):\n forward(100)\n left(90)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 10 </h3>\nDans le programme ci-dessous:\n\n1. Définissez une fonction `triangle100()` pour dessiner un triangle équilatéral de côté 100 comme dans l’illustration A.\n \n2. Utilisez `triangle100()` pour dessiner une forme comme dans l’illustration B.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\n# à compléter\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\n# à compléter\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 11 </h3>\n\nUtilisez les commandes `carre100()` et `triangle100()` définies dans les exercices 9 et 10 pour dessiner une figure semblable à celle représentée ci-dessous.\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\n# à compléter\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\n# à compléter\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 12 </h3>\n\nDans le programme ci-dessous:\n\n1. Définissez une fonction `carre_ouvert()` qui dessine un carré ouvert comme dans l’illustration A.\n\n \n2. Utilisez `carre_ouvert()` pour dessiner une croix comme dans l’illustration B.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\n# à compléter\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\n# à compléter\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 13 </h3>\n\nCréez une fonction `paquebot()` et utilisez pour dessiner deux paquebots." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(200)\nleft(80)\nforward(60)\nleft(100)\nforward(220)\nleft(100)\nforward(60)\n\npenup()\nleft(125)\nforward(30)\nright(45)\n\nfor i in range(6):\n pendown()\n circle(10, 360)\n penup()\n forward(30)\n \n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(200)\nleft(80)\nforward(60)\nleft(100)\nforward(220)\nleft(100)\nforward(60)\n\npenup()\nleft(125)\nforward(30)\nright(45)\n\nfor i in range(6):\n pendown()\n circle(10, 360)\n penup()\n forward(30)\n \n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 14 </h3>\n\nUtilisez l'instruction `carre100()` définie dans l'exercices 9 pour réaliser le programme qui dessine d’abord 2 carrés décalés d’un angle de 20° (figure A) et ensuite la figure avec 18 carrés (figure B)..\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 15 </h3>Coloriez la fleur.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef petale():\n for _ in range(2):\n circle(100, 120)\n left(60)\n\nfor _ in range(6):\n petale()\n left(60)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef petale():\n for _ in range(2):\n circle(100, 120)\n left(60)\n\nfor _ in range(6):\n petale()\n left(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 16 </h3>\n\nAjoutez une fonction `m()` pour écrire le mot `nom`. Ajoutez ensuite des fonctions qui dessinent les lettres pour écrire votre prénom.\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\nwidth(5)\n\ndef n():\n down()\n left(90)\n forward(2*30) # montée\n backward(30) # retour au milieu\n circle(-30, 180) # demi-cercle\n forward(30) # descente\n left(90)\n up()\n forward(30) # avance vers la prochaine lettre\n\ndef o():\n forward(30) # avance vers milieu\n down()\n circle(30)\n up()\n forward(2*30) # avance vers prochaine lettre\n\nn()\no()\nn()\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\nwidth(5)\n\ndef n():\n down()\n left(90)\n forward(2*30) # montée\n backward(30) # retour au milieu\n circle(-30, 180) # demi-cercle\n forward(30) # descente\n left(90)\n up()\n forward(30) # avance vers la prochaine lettre\n\ndef o():\n forward(30) # avance vers milieu\n down()\n circle(30)\n up()\n forward(2*30) # avance vers prochaine lettre\n\nn()\no()\nn()\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 17</h3>\n\nDessinez et coloriez un jardin. Définissez des fonctions pour des pétales, feuilles et fleurs.\n\n*Indication: Inspirez vous de l'exercice 15.*" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n# Prénom Nom, classe\n\ndot(1000, 'lightgreen') # background\n\ndef petale():\n ...\ndef feuille():\n ...\ndef fleur():\n dot(50, 'red')\n\nfeuille()\nforward(200)\nfleur()\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n# Prénom Nom, classe\n\ndot(1000, 'lightgreen') # background\n\ndef petale():\n ...\ndef feuille():\n ...\ndef fleur():\n dot(50, 'red')\n\nfeuille()\nforward(200)\nfleur()\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 18 (meubles) </h3>\n\nDéfinissez 3 fonctions pour dessiner une chaise, une table et un lit.\nEnsuite placez plusieurs meubles dans l'espace\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef chaise():\n # à compléter...\n\ndef table():\n # à compléter...\n\ndef lit():\n # à compléter...\n\nchaise()\ntable()\nlit()\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef chaise():\n # à compléter...\n\ndef table():\n # à compléter...\n\ndef lit():\n # à compléter...\n\nchaise()\ntable()\nlit()\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 19 </h3>\n\nUtiliser votre identifiant EEL et le mot de passe *Sismondi2024* pour faire les exercices de la **série D** de la plateforme [AlgoPython](https://www.algopython.fr/login). [](https://www.algopython.fr/login)\n\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "---\n\n#### Remarque générale\n\nCe document est une adaptation d'un ressource pédagogique tiré du catalogue modulo https://modulo-info.ch/. Il est sous license Creative Commons [BY-NC-SA](https://creativecommons.org/licenses/?lang=fr)\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "" } ], "metadata": { diff --git a/Notebooks/03_fonction_simple_avec_solution.ipynb b/Notebooks/03_fonction_simple_avec_solution.ipynb index 4729c93fcf5fb758f8c3b78e783dc06a0371961f..35dc63cbe39dd168f4fa9654961febc3c5eff13c 100644 --- a/Notebooks/03_fonction_simple_avec_solution.ipynb +++ b/Notebooks/03_fonction_simple_avec_solution.ipynb @@ -1,493 +1,493 @@ { "cells": [ { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-danger\"> \n \n# Cours avec solution\n</div>\n\n<div class = \"alert alert-block alert-warning\"> \n\n### A faire avant de commençer\n**Cliquez sur Exécuter tout** dans le menu **Cellule**.\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "# Le fonctions simples" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Définir - `def`\n\nDans ce chapitre, nous allons découvrir comment augmenter le vocabulaire de notre langage de programmation en définissant de nouvelles instructions, qu'on appelle aussi **fonction**. Ceci permet de rendre un code plus compact, mais surtout plus lisible. Nous allons voir que :\n\n- le mot-clé `def` permet de nommer (définir) une séquence,\n- le bloc qui suit doit être en **indentation** (décalé à droite)," }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\nUne fonction permet de\n\nA) donner un nom à une séquence\nB) augmenter le vocabulaire du langage de programmation\nC) nous dire si ça fonctionne\nD) rendre un programme plus lisible\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\nA) donner un nom à une séquence\n\nB) augmenter le vocabulaire du langage de programmation\n\nD) rendre un programme plus lisible\n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Nommer une séquence\n\nDessiner un rectangle est assez utile. C'est une forme qu'on pourra réutiliser certainement souvent. Il serait pratique de définir un nom pour ces 8 lignes de code. Pouvons-nous définir de nouvelles commandes ?\n\n```Python\nforward(160)\nleft(90)\nforward(100)\nleft(90)\nforward(160)\nleft(90)\nforward(100)\nleft(90)\n```\nOui, c'est possible. Avec le mot-clé `def`, nous pouvons définir une nouvelle commande que nous pouvons par exemple appeler `rectangle()`.\nCette façon de créer un raccourci est appelée **définir** une fonction.\nLe code à exécuter suit l'expression `def rectangle():` et se trouve en **indentation** (décalé vers la droite).\n\nEnsuite, il suffit d'écrire `rectangle()` pour dessiner un rectangle. On appelle ceci **appeler** une fonction.\nRappelez-vous ceci :\n\n- on définit une fonction une seule fois,\n- on appelle une fonction autant de fois que l'on veut,\n- si on ne l'appelle pas, elle n'est pas exécutée et il ne se passe rien.\n\nDéfinir une fonction nous permet de réduire le nombre de lignes de code nécessaires.\nChaque fois que nous utilisons `rectangle()`,\nau lieu d'écrire 8 lignes, nous écrivons seulement une ligne de code." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 1 </h3>\n\nDessinez encore d'autres rectangles en appelant la nouvelle fonction `rectangle()`.\n\n```Python\nfrom turtle import *\n\ndef rectangle():\n forward(160)\n left(90)\n forward(100)\n left(90)\n forward(160)\n left(90)\n forward(100)\n left(90)\n\nrectangle()\nleft(90)\nrectangle()\n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef rectangle():\n forward(160)\n left(90)\n forward(100)\n left(90)\n forward(160)\n left(90)\n forward(100)\n left(90)\n\nrectangle()\nleft(90)\nrectangle()\nleft(90)\nrectangle()\nleft(90)\nrectangle()\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef rectangle():\n forward(160)\n left(90)\n forward(100)\n left(90)\n forward(160)\n left(90)\n forward(100)\n left(90)\n\nrectangle()\nleft(90)\nrectangle()\nleft(90)\nrectangle()\nleft(90)\nrectangle()\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\nRappel: Une indentation de texte est\n\nA) un décalage vers la gauche\nB) un décalage vers la droite\nC) une mise en paragraphe\nD) une mise en sous-section\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\nB) un décalage vers la droite\n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Donner du sens\n\nUne fonction ne permet pas seulement d'économiser des lignes de code.\nElle permet aussi de structurer le code et de lui donner un sens. Considérez par exemple le code ci-dessous. Il est presque impossible de comprendre ce que fait le programme en regardant les 17 lignes de code.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(30)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(30)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "Si nous observons la tortue, nous comprenons finalement qu'elle dessine deux fois un rectangle. Nous pouvons même interpréter cette image et donner le sens de bâtiment au premier rectangle, et de porte au second.\n\nEssayons maintenant de découper le code en **sous-programmes** en utilisant deux fonctions `batiment()` et `porte()`.\nEn regardant ces 3 lignes de code, on comprend immédiatement le sens du programme.\n\n``` python\nbatiment()\nforward(30) # repositionner la tortue\nporte()\n```\n\nLa définition d'une fonction permet d'ajouter de nouveaux mots à un langage de programmation. Contrairement aux commandes natives de Python qui sont toutes en anglais, nous sommes libres de les choisir en français.\n\n**Attention** : écrivez les fonctions sans accents et sans circonflexes : `batiment()`, `carre()`, `boite()`.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 2 </h3>Ajoutez une deuxième porte au bâtiment. Ensuite, faites-en une porte double.\n\n```Python\nfrom turtle import *\n\ndef batiment():\n forward(200)\n left(90)\n forward(100)\n left(90)\n forward(200)\n left(90)\n forward(100)\n left(90)\n\ndef porte():\n forward(30)\n left(90)\n forward(50)\n left(90)\n forward(30)\n left(90)\n forward(50)\n left(90)\n\nbatiment()\nforward(30)\nporte()\n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef batiment():\n forward(200)\n left(90)\n forward(100)\n left(90)\n forward(200)\n left(90)\n forward(100)\n left(90)\n\ndef porte():\n forward(30)\n left(90)\n forward(50)\n left(90)\n forward(30)\n left(90)\n forward(50)\n left(90)\n\nbatiment()\nforward(30)\nporte()\nforward(60)\nporte()\nforward(30)\nporte()\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef batiment():\n forward(200)\n left(90)\n forward(100)\n left(90)\n forward(200)\n left(90)\n forward(100)\n left(90)\n\ndef porte():\n forward(30)\n left(90)\n forward(50)\n left(90)\n forward(30)\n left(90)\n forward(50)\n left(90)\n\nbatiment()\nforward(30)\nporte()\nforward(60)\nporte()\nforward(30)\nporte()\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n\nÀ combien de lignes de code la fonction `porte()` est-elle équivalente ?\n\n\n```\nA) 1 ligne\nB) 2 lignes\nC) 8 lignes\nD) 17 lignes\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\nC) 8 lignes\n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Définir une fonction\n\nLe fait de donner un nom à une séquence d'instructions est appelé **définir une fonction**. Une **définition de fonction** comporte :\n\n1. le mot-clé `def` (définir),\n1. le nom de la fonction (`batiment/porte`),\n1. les parenthèses `()`,\n1. le deux-points `:`,\n1. un bloc en indentation.\n\nQu'est-ce qu'un bloc en indentation ?\nC'est un bloc de texte qui comporte des espaces vides à gauche. En Python, ces espaces apparaissent en multiples de 4.\n\nL'indentation est très importante en Python. C'est l'indentation qui indique l'étendue des instructions qui font partie de la fonction.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\nParmi les 4 définitions de fonction ci-dessous, laquelle est correcte ?\n\nA) def() rectangle:\nB) def: rectangle\nC) def rectangle():\nD) def(rectangle):\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\nC) def rectangle():\n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Indenter avec un raccourci\n\nComme l'indentation est tellement importante en Python, il en existe un raccourci.\nIl faut d'abord sélectionner **les lignes** de code dont vous voulez changer l'indentation.\nEnsuite, vous appuyez sur :\n\n- la touche **tab** pour augmenter l'indentation\n- la touche **maj+tab** pour diminuer l'indentation\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 3 </h3>\n\nEssayez ces raccourcis dans le code ci-dessous. Transformez le code en deux fonctions `batiment()` et `porte()`, que vous appelez ensuite.\n\n```Python\nfrom turtle import *\n\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(200)\nleft(90)\nforward(100)\nleft(90)\nforward(30)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\nforward(30)\nleft(90)\nforward(50)\nleft(90)\n\ndone()\n```\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef batiment():\n forward(200)\n left(90)\n forward(100)\n left(90)\n forward(200)\n left(90)\n forward(100)\n left(90)\n \n \ndef porte():\n forward(30)\n left(90)\n forward(50)\n left(90)\n forward(30)\n left(90)\n forward(50)\n left(90)\n\nbatiment()\nforward(30)\nporte()\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef batiment():\n forward(200)\n left(90)\n forward(100)\n left(90)\n forward(200)\n left(90)\n forward(100)\n left(90)\n \n \ndef porte():\n forward(30)\n left(90)\n forward(50)\n left(90)\n forward(30)\n left(90)\n forward(50)\n left(90)\n\nbatiment()\nforward(30)\nporte()\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "Voici encore un raccourci très utile : **maj(ou Shift)+Enter** pour exécuter le code.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Maison avec porte\n\nUne fois qu'une fonction est définie, elle peut être utilisée partout, même dans la définition d'une autre fonction.\n\nIci, nous avons une fonction `porte()`, qui est utilisée à l'intérieur d'une deuxième fonction `maison()`. Pour que ceci soit possible, la définition de porte doit être placée avant la définition de `maison()`.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 4 </h3>Déplacez la porte vers le milieu de la maison, et dessinez une deuxième maison à coté.\n\n```Python\nfrom turtle import *\n\ndef porte():\n forward(20)\n left(90)\n forward(40)\n left(90)\n forward(20)\n left(90)\n forward(40)\n left(90)\n\ndef maison():\n forward(100)\n left(90)\n forward(60)\n left(45)\n forward(71)\n left(90)\n forward(71)\n left(45)\n forward(60)\n left(90)\n porte()\n\nmaison()\n\ndone()\n\n```\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef porte():\n forward(20)\n left(90)\n forward(40)\n left(90)\n forward(20)\n left(90)\n forward(40)\n left(90)\n\ndef maison():\n forward(100)\n left(90)\n forward(60)\n left(45)\n forward(71)\n left(90)\n forward(71)\n left(45)\n forward(60)\n left(90)\n forward(40)# pour déplacer la porte\n porte()\n\nmaison()\npenup()\nforward(100)\npendown()\nmaison()\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef porte():\n forward(20)\n left(90)\n forward(40)\n left(90)\n forward(20)\n left(90)\n forward(40)\n left(90)\n\ndef maison():\n forward(100)\n left(90)\n forward(60)\n left(45)\n forward(71)\n left(90)\n forward(71)\n left(45)\n forward(60)\n left(90)\n forward(40)# pour déplacer la porte\n porte()\n\nmaison()\npenup()\nforward(100)\npendown()\nmaison()\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Plus sur \"La tortue\"\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Le point `dot()`\n\nLa fonction `dot()` dessine un point à la position actuelle de la tortue." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 5 </h3>\n\nAjoutez un point (`dot`) au sommet du triangle.\n\n```Python\nfrom turtle import *\n\ndef triangle():\n dot()\n forward(100)\n left(120)\n dot()\n forward(100)\n left(120)\n forward(100)\n\ntriangle()\n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef triangle():\n dot()\n forward(100)\n left(120)\n dot()\n forward(100)\n left(120)\n forward(100)\n dot() # troisième point\n\ntriangle()\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef triangle():\n dot()\n forward(100)\n left(120)\n dot()\n forward(100)\n left(120)\n forward(100)\n dot() # troisième point\n\ntriangle()\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Lever le stylo\n\nLes deux commandes `up()` et `down()` permettent de lever et de baisser le stylo.\nCeci nous permet de dessiner des formes séparées, comme ici le petit i avec son point.\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 6 </h3>\n\nTransformez le i vers un i avec trema (deux points).\n```Python\nfrom turtle import *\n\ndef i():\n dot()\n pendown() # poser le stylo\n left(90)\n forward(50)\n penup() # lever le stylo\n forward(50)\n dot()\n backward(2*50)\n right(90)\n forward(50/2) # avancer à la prochaine lettre\n\ni()\ni()\n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef i():\n dot()\n pendown() # poser le stylo\n left(90)\n forward(50)\n penup() # lever le stylo\n forward(50)\n #modif\n left(90)\n forward(5)\n dot()\n backward(10)\n dot()\n forward(5)\n right(90)\n #fin modif\n backward(2*50)\n right(90)\n forward(50/2) # avancer à la prochaine lettre\n\ni()\ni()\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef i():\n dot()\n pendown() # poser le stylo\n left(90)\n forward(50)\n penup() # lever le stylo\n forward(50)\n #modif\n left(90)\n forward(5)\n dot()\n backward(10)\n dot()\n forward(5)\n right(90)\n #fin modif\n backward(2*50)\n right(90)\n forward(50/2) # avancer à la prochaine lettre\n\ni()\ni()\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Exercices d'entraînement\n\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 7 </h3>\n\nCompléter le programme ci-dessous en ajoutant des appels à la fonction `forme_mystere()` pour pour créer le dessin suivant:\n\n\n```Python\nfrom turtle import *\n\ndef i():\n dot()\n pendown() # poser le stylo\n left(90)\n forward(50)\n penup() # lever le stylo\n forward(50)\n dot()\n backward(2*50)\n right(90)\n forward(50/2) # avancer à la prochaine lettre\n\ni()\ni()\n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "# permet d'utiliser les fonctions pour dessiner\nfrom turtle import *\n\n# Définition de la fonction mystère\ndef forme_mystere():\n for _ in range(4):\n forward(100)\n right(90)\n\nfor _ in range(4):\n forme_mystere()\n left(90)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "# permet d'utiliser les fonctions pour dessiner\nfrom turtle import *\n\n# Définition de la fonction mystère\ndef forme_mystere():\n for _ in range(4):\n forward(100)\n right(90)\n\nfor _ in range(4):\n forme_mystere()\n left(90)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 8 </h3>\n\n1. Testez le programme suivant." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "# permet d'utiliser les fonctions pour dessiner\nfrom turtle import *\n\n# Code à factoriser\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "# permet d'utiliser les fonctions pour dessiner\nfrom turtle import *\n\n# Code à factoriser\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\nfor k in range(6):\n forward(100)\n right(60)\nright(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "2. Définissez une fonction `hexagone()` qui permet de tracer des hexagones et utilisez-là pour réduire le nombre d’instructions du programme précédent. En utilisant une boucle `for` avec `hexagone()`, votre programme ne devrait pas dépasser 10 lignes." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "# permet d'utiliser les fonctions pour dessiner\nfrom turtle import *\n\ndef hexagone():\n for k in range(6):\n forward(100)\n right(60)\n\n \nfor _ in range(6):\n hexagone()\n right(60)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "# permet d'utiliser les fonctions pour dessiner\nfrom turtle import *\n\ndef hexagone():\n for k in range(6):\n forward(100)\n right(60)\n\n \nfor _ in range(6):\n hexagone()\n right(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 9 </h3>\n\nTestez le programme ci-dessous, puis modifiez le en définissant au début une fonction `carre100()` qui dessine un carré de longueur 100 afin d'obtenir un programme structuré sans répétition inutile.\n```Python\nfrom turtle import *\n\n\nfor _ in range(4):\n forward(100)\n left(90)\n\n\nleft(180)\n\n\nfor _ in range(4):\n forward(100)\n left(90)\n\ndone()\n\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef carre100():\n for _ in range(4):\n forward(100)\n left(90)\n\ncarre100()\nleft(180)\ncarre100()\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef carre100():\n for _ in range(4):\n forward(100)\n left(90)\n\ncarre100()\nleft(180)\ncarre100()\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 10 </h3>\nDans le programme ci-dessous:\n\n1. Définissez une fonction `triangle100()` pour dessiner un triangle équilatéral de côté 100 comme dans l’illustration A.\n \n2. Utilisez `triangle100()` pour dessiner une forme comme dans l’illustration B.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef triangle100():\n for _ in range(3):\n forward(100)\n left(120)\n\nbackward(100)# pour avoir tout dans la fenêtre \n\ntriangle100()\n\n# déplacement\npenup()\nforward(250)\npendown()\n\nfor _ in range(6):\n triangle100()\n left(60)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef triangle100():\n for _ in range(3):\n forward(100)\n left(120)\n\nbackward(100)# pour avoir tout dans la fenêtre \n\ntriangle100()\n\n# déplacement\npenup()\nforward(250)\npendown()\n\nfor _ in range(6):\n triangle100()\n left(60)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 11 </h3>\n\nUtilisez les commandes `carre100()` et `triangle100()` définies dans les exercices 9 et 10 pour dessiner une figure semblable à celle représentée ci-dessous.\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef triangle100():\n for _ in range(3):\n forward(100)\n left(120)\n \ndef carre100():\n for _ in range(4):\n forward(100)\n left(90)\n \ndef maison():\n carre100()\n left(90)#placer le triangle au sommet\n forward(100)\n right(90)\n triangle100()\n # revenir au coin gauche\n right(90)\n forward(100)\n left(90)\n\nfor _ in range(3):\n maison()\n forward(100)\n \ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef triangle100():\n for _ in range(3):\n forward(100)\n left(120)\n \ndef carre100():\n for _ in range(4):\n forward(100)\n left(90)\n \ndef maison():\n carre100()\n left(90)#placer le triangle au sommet\n forward(100)\n right(90)\n triangle100()\n # revenir au coin gauche\n right(90)\n forward(100)\n left(90)\n\nfor _ in range(3):\n maison()\n forward(100)\n \ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 12 </h3>\n\nDans le programme ci-dessous:\n\n1. Définissez une fonction `carre_ouvert()` qui dessine un carré ouvert comme dans l’illustration A.\n\n \n2. Utilisez `carre_ouvert()` pour dessiner une croix comme dans l’illustration B.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef carre_ouvert():\n for _ in range(3):\n left(90)\n forward(100)\n \nfor _ in range(4):\n carre_ouvert()\n right(180)\n \ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef carre_ouvert():\n for _ in range(3):\n left(90)\n forward(100)\n \nfor _ in range(4):\n carre_ouvert()\n right(180)\n \ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 13 </h3>\n\nCréez une fonction `paquebot()` et utilisez pour dessiner deux paquebots.\n\n```Python\nfrom turtle import *\n\nforward(200)\nleft(80)\nforward(60)\nleft(100)\nforward(220)\nleft(100)\nforward(60)\n\npenup()\nleft(125)\nforward(30)\nright(45)\n\nfor i in range(6):\n pendown()\n circle(10, 360)\n penup()\n forward(30)\n \n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(200)\nleft(80)\nforward(60)\nleft(100)\nforward(220)\nleft(100)\nforward(60)\n\npenup()\nleft(125)\nforward(30)\nright(45)\n\nfor i in range(6):\n pendown()\n circle(10, 360)\n penup()\n forward(30)\n \n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nforward(200)\nleft(80)\nforward(60)\nleft(100)\nforward(220)\nleft(100)\nforward(60)\n\npenup()\nleft(125)\nforward(30)\nright(45)\n\nfor i in range(6):\n pendown()\n circle(10, 360)\n penup()\n forward(30)\n \n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 14 </h3>\n\nUtilisez l'instruction `carre100()` définie dans l'exercices 9 pour réaliser le programme qui dessine d’abord 2 carrés décalés d’un angle de 20° (figure A) et ensuite la figure avec 18 carrés (figure B)..\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\nspeed(10)\n \ndef carre100():\n for _ in range(4):\n forward(100)\n left(90)\n \nbackward(100)#se mettre plus à chauche\n\n#figure A\ncarre100()\nleft(20)\ncarre100()\nright(20)\n\npenup()\nforward(250)\npendown()\n\n#figure B\nfor _ in range(18):\n carre100()\n left(360/18)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\nspeed(10)\n \ndef carre100():\n for _ in range(4):\n forward(100)\n left(90)\n \nbackward(100)#se mettre plus à chauche\n\n#figure A\ncarre100()\nleft(20)\ncarre100()\nright(20)\n\npenup()\nforward(250)\npendown()\n\n#figure B\nfor _ in range(18):\n carre100()\n left(360/18)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 15 </h3>Coloriez la fleur.\n\n```Python\nfrom turtle import *\n\ndef petale():\n for _ in range(2):\n circle(100, 120)\n left(60)\n\nfor _ in range(6):\n petale()\n left(60)\n\ndone()\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef petale():\n begin_fill()\n for _ in range(2):\n circle(100, 120)\n left(60)\n end_fill()\n\npencolor(\"red\")\nfillcolor(\"blue\")\nfor _ in range(6):\n petale()\n left(60)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef petale():\n begin_fill()\n for _ in range(2):\n circle(100, 120)\n left(60)\n end_fill()\n\npencolor(\"red\")\nfillcolor(\"blue\")\nfor _ in range(6):\n petale()\n left(60)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 16 </h3>\n\nAjoutez une fonction `m()` pour écrire le mot `nom`. Ajoutez ensuite des fonctions qui dessinent les lettres pour écrire votre prénom.\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\nwidth(5)\n\ndef n():\n down()\n left(90)\n forward(2*30) # montée\n backward(30) # retour au milieu\n circle(-30, 180) # demi-cercle\n forward(30) # descente\n left(90)\n up()\n forward(30) # avance vers la prochaine lettre\n\ndef o():\n forward(30) # avance vers milieu\n down()\n circle(30)\n up()\n forward(2*30) # avance vers prochaine lettre\n\nn()\no()\nn()\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\nwidth(5)\n\ndef n():\n down()\n left(90)\n forward(2*30) # montée\n backward(30) # retour au milieu\n circle(-30, 180) # demi-cercle\n forward(30) # descente\n left(90)\n up()\n forward(30) # avance vers la prochaine lettre\n\ndef o():\n forward(30) # avance vers milieu\n down()\n circle(30)\n up()\n forward(2*30) # avance vers prochaine lettre\n\nn()\no()\nn()\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 17</h3>\n\nDessinez et coloriez un jardin. Définissez des fonctions pour des pétales, feuilles et fleurs.\n\n*Indication: Inspirez vous de l'exercice 15.*" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n# Prénom Nom, classe\n\ndot(1000, 'lightgreen') # background\n\ndef petale():\n ...\ndef feuille():\n ...\ndef fleur():\n dot(50, 'red')\n\nfeuille()\nforward(200)\nfleur()\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n# Prénom Nom, classe\n\ndot(1000, 'lightgreen') # background\n\ndef petale():\n ...\ndef feuille():\n ...\ndef fleur():\n dot(50, 'red')\n\nfeuille()\nforward(200)\nfleur()\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 18 (meubles) </h3>\n\nDéfinissez 3 fonctions pour dessiner une chaise, une table et un lit.\nEnsuite placez plusieurs meubles dans l'espace\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef chaise():\n # à compléter...\n\ndef table():\n # à compléter...\n\ndef lit():\n # à compléter...\n\nchaise()\ntable()\nlit()\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef chaise():\n # à compléter...\n\ndef table():\n # à compléter...\n\ndef lit():\n # à compléter...\n\nchaise()\ntable()\nlit()\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 19 </h3>\n\nUtiliser votre identifiant EEL et le mot de passe *Sismondi2024* pour faire les exercices de la **série D** de la plateforme [AlgoPython](https://www.algopython.fr/login). [](https://www.algopython.fr/login)\n\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "---\n\n#### Remarque générale\n\nCe document est une adaptation d'un ressource pédagogique tiré du catalogue modulo https://modulo-info.ch/. Il est sous license Creative Commons [BY-NC-SA](https://creativecommons.org/licenses/?lang=fr)\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "" } ], "metadata": { diff --git a/Notebooks/04_Les_fonctions_avec_parametres_corrige.ipynb b/Notebooks/04_Les_fonctions_avec_parametres_corrige.ipynb index 68300f24b9ce5db91d2272f78f34b85d4484f52e..86723be2f45b7cadc29b4dc986e53d9158646735 100644 --- a/Notebooks/04_Les_fonctions_avec_parametres_corrige.ipynb +++ b/Notebooks/04_Les_fonctions_avec_parametres_corrige.ipynb @@ -1,411 +1,411 @@ { "cells": [ { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-danger\"> \n \n# Cours avec solution\n</div>\n\n<div class = \"alert alert-block alert-warning\"> \n\n### A faire avant de commençer\n**Cliquez sur Exécuter tout** dans le menu **Cellule**.\n</div>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "# 4. Les fonctions avec paramètres\n\nDans cette leçon, nous allons approfondir le concept de la fonction. Dans la leçon 3 sur les fonctions simples, nous avons vu la fonction comme une façon de donner un nom à une séquence d'instructions. Ici nous allons voir comment nous pouvons ajouter un ou plusieurs paramètres à une fonction. Nous allons voir que :\n\n- l'expression `def rect(d, e):` permet de définir une fonction avec deux paramètres,\n- les paramètres `d, e` sont des variables locales valides uniquement à l'intérieur de la définition de fonction,\n- ces paramètres prennent une valeur au moment de l'appel de la fonction avec `rect(50, 30)`.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\nEn Python, `def` est un raccourci pour\n\nA) défoncé\nB) défilé\nC) définition\nD) défavorisé\n```" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\nC) définition\n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Paramétrer une fonction\n\nJusqu'à maintenant, notre rectangle était d'une taille fixe. La fonction `rectangle()` de la leçon 3 sur les fonctions simples \n```python \ndef rectangle():\n forward(160)\n left(90)\n forward(100)\n left(90)\n forward(160)\n left(90)\n forward(100)\n left(90)\n```\n dessine toujours un rectangle de 160 x 100 pixels. Il faudrait faire une nouvelle fonction `rectangle2()` si on voulait dessiner une taille différente.\n\nIl serait très utile de disposer d'une fonction de la forme `rectangle(d, e)` qui puisse dessiner des rectangles de largeur et hauteur variable.\nC'est possible en spécifiant des **paramètres** pour la fonction.\nUn paramètre de fonction est une **variable locale** qui peut être utilisée dans sa définition.\n\nLors de l'appel de la fonction, nous donnons des valeurs à la fonction.\nCes valeurs sont les **arguments** de la fonction.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 1 </h3>\n\nComplétez le programme ci-dessous afin de dessiner un deuxième rectangle avec d'autres dimensions.\n\n```Python\nfrom turtle import *\n\ndef rectangle(d, e): # paramètres (d, e)\n for i in range(2):\n forward(d)\n left(90)\n forward(e)\n left(90)\n\nrectangle(160, 100) # largeur=160, hauteur=100\n\n# à compléter\n\ndone()\n\n```\n\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\ndef rectangle(d, e): # paramètres (d, e)\n for i in range(2):\n forward(d)\n left(90)\n forward(e)\n left(90)\n\nrectangle(160, 100) # largeur=160, hauteur=100\n\nrectangle(200, 150) # largeur=160, hauteur=100\n\nrectangle(100, 250) # largeur=160, hauteur=100\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef rectangle(d, e): # paramètres (d, e)\n for i in range(2):\n forward(d)\n left(90)\n forward(e)\n left(90)\n\nrectangle(160, 100) # largeur=160, hauteur=100\n\nrectangle(200, 150) # largeur=160, hauteur=100\n\nrectangle(100, 250) # largeur=160, hauteur=100\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Exemples de fonctions avec des paramétres\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "**Exemple 1 : Le Losange**\n\nEssayez de comprendre le programme ci-dessous, puis exécutez le..." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\ndef losange(d, a): # paramètres (d=distance, a=angle)\n for i in range(2):\n forward(d)\n left(a)\n\n forward(d)\n left(180-a)\n\nlosange(100, 60) # distance=100, angle=60\nlosange(140, 100) # distance=140, angle=100\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef losange(d, a): # paramètres (d=distance, a=angle)\n for i in range(2):\n forward(d)\n left(a)\n\n forward(d)\n left(180-a)\n\nlosange(100, 60) # distance=100, angle=60\nlosange(140, 100) # distance=140, angle=100\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "On remarque que la fonction `losange(a, angle)`, définie ci-dessus, a comme paramètre la longueur et le premier angle. \n\nRemarque: Le deuxième angle du losange est calculé." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "**Exemple 2 : Le polygone**\n\nEssayez de comprendre le programme ci-dessous, puis exécutez le..." }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\ndef polygone(d, n): # paramètres (d, n)\n for i in range(n):\n forward(d)\n left(360/n)\n\npolygone(100, 3) # triangle\npolygone(100, 4) # carré\npolygone(100, 5) # pentagon\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef polygone(d, n): # paramètres (d, n)\n for i in range(n):\n forward(d)\n left(360/n)\n\npolygone(100, 3) # triangle\npolygone(100, 4) # carré\npolygone(100, 5) # pentagon\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "On remarque que la fonction `polygone(d, n)` a comme paramètre la distance d'un côté et le nombre de sommets.\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Retour à la maison...\n\nRevenons à l'exemple d'une fonction qui dessine une maison.\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 2 </h3>\n\nComplétez le programme afin qu'il dessine une troisième maison de taille 100.\n\n```Python\nfrom turtle import *\n\ndef maison(d):\n dot()\n forward (1.41*d) # sol\n left(90)\n forward(d) # mur droit\n left(45)\n forward(d) # toit droit\n left(90)\n forward(d) # toit gauche\n left(45)\n forward(d) # mur gauche\n left(90)\n\nbackward(200)\nmaison(50) # maison de taille 50\nforward(100)\nmaison(70) # maison de taille 70\n\n# à compléter\n\ndone()\n```\n\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\ndef maison(d):\n dot()\n forward (1.41*d) # sol\n left(90)\n forward(d) # mur droit\n left(45)\n forward(d) # toit droit\n left(90)\n forward(d) # toit gauche\n left(45)\n forward(d) # mur gauche\n left(90)\n\nbackward(200)\nmaison(50) # maison de taille 50\nforward(100)\nmaison(70) # maison de taille 70\n\nforward(150)\nmaison(100) # maison de taille 100\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef maison(d):\n dot()\n forward (1.41*d) # sol\n left(90)\n forward(d) # mur droit\n left(45)\n forward(d) # toit droit\n left(90)\n forward(d) # toit gauche\n left(45)\n forward(d) # mur gauche\n left(90)\n\nbackward(200)\nmaison(50) # maison de taille 50\nforward(100)\nmaison(70) # maison de taille 70\n\nforward(150)\nmaison(100) # maison de taille 100\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Positionner la maison\n\n!!! info Rappel\nAu départ, la tortue se trouve au centre d'une zone rectangulaire appelée _canevas_. \n\nCe rectangle a les propriétés suivantes :\n\n- l'origine (0, 0) se trouve au centre,\n- l'axe horizontal x, s'étend de -300 à +300 (à droite),\n- l'axe vertical y, s'étend de -200 à +200 (en haut).\n!!!\n\nLa fonction `goto(x, y)` permet de placer directement la tortue à la position de coordonnées `(x, y)`. On peut utiliser `goto(x, y)` pour positionner notre maison à un endroit précis.\n\nPour désigner une position, nous utilisons la variable `p` (p pour position) qui représente le couple de coordonnées `[x, y]`." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 3 </h3>Aujoutez deux autres maisons de taille différente.\n\n```Python\nfrom turtle import *\n\ndef maison(p , d):\n goto(p) # aller à la position p\n dot() # ajouter un marquer (dot)\n down()\n forward (1.41*d) # sol\n left(90)\n forward(d) # mur droit\n left(45)\n forward(d) # toit droit\n left(90)\n forward(d) # toit gauche\n left(45)\n forward(d) # mur gauche\n left(90)\n up()\n\nmaison([0, 0], 50) # maison à la position (0, 0)\nmaison([-150, 50], 70) # maison à la position (-150, 50)\n\ndone()\n```\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\ndef maison(p , d):\n goto(p) # aller à la position p\n dot() # ajouter un marquer (dot)\n down()\n forward (1.41*d) # sol\n left(90)\n forward(d) # mur droit\n left(45)\n forward(d) # toit droit\n left(90)\n forward(d) # toit gauche\n left(45)\n forward(d) # mur gauche\n left(90)\n up()\n\nmaison([0, 0], 50) # maison à la position (0, 0)\nmaison([-150, 50], 70) # maison à la position (-150, 50)\n\nmaison([-150, -200], 100) # maison à la position (-150, -200)\nmaison([130, 50], 30) # maison à la position (-150, -200)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef maison(p , d):\n goto(p) # aller à la position p\n dot() # ajouter un marquer (dot)\n down()\n forward (1.41*d) # sol\n left(90)\n forward(d) # mur droit\n left(45)\n forward(d) # toit droit\n left(90)\n forward(d) # toit gauche\n left(45)\n forward(d) # mur gauche\n left(90)\n up()\n\nmaison([0, 0], 50) # maison à la position (0, 0)\nmaison([-150, 50], 70) # maison à la position (-150, 50)\n\nmaison([-150, -200], 100) # maison à la position (-150, -200)\nmaison([130, 50], 30) # maison à la position (-150, -200)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "!!! info Les listes\nEn Python les données peuvent être de plusieurs type. Par exemple, nous avons déjà rencontré le type nombre entier (`int`), nombre à virgule **flottante** (`float`) et chaînes de caractères (`str`).\n\nEn python, le type `list` permet de définir des données composée d e plusieurs valeurs. Il suffit de mettre les valeurs, séparées par des virgules, entre des crochets.\n!!!" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Colorier la maison\n\nMaintenant nous modifions la fonction pour inclure non seulement la position, la taille, mais également la couleur de la maison comme paramètres. Les arguments de la fonction sont :\n\n- `p` -- position de la maison\n- `d` -- dimension de la maison\n- `c` -- couleur de la maison\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 4 </h3>Aujoutez deux autres maisons de taille et couleur différente.\n\n```Python\nfrom turtle import *\nup()\n\ndef maison(p, d, c):\n goto(p)\n dot()\n down()\n fillcolor(c)\n begin_fill()\n forward (1.41*d) # sol\n left(90)\n forward(d) # mur droit\n left(45)\n forward(d) # toit droit\n left(90)\n forward(d) # toit gauche\n left(45)\n forward(d) # mur gauche\n left(90)\n end_fill()\n up()\n\nmaison([0, 0], 70, 'lightblue')\nmaison([150, 30], 50, 'yellow')\n\ndone()\n```\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\nup()\n\ndef maison(p, d, c):\n goto(p)\n dot()\n down()\n fillcolor(c)\n begin_fill()\n forward (1.41*d) # sol\n left(90)\n forward(d) # mur droit\n left(45)\n forward(d) # toit droit\n left(90)\n forward(d) # toit gauche\n left(45)\n forward(d) # mur gauche\n left(90)\n end_fill()\n up()\n\nmaison([0, 0], 70, 'lightblue')\nmaison([150, 30], 50, 'yellow')\n\nmaison([-150, -200], 100, \"blue\") \nmaison([-180, 80], 30, \"green\") \n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\nup()\n\ndef maison(p, d, c):\n goto(p)\n dot()\n down()\n fillcolor(c)\n begin_fill()\n forward (1.41*d) # sol\n left(90)\n forward(d) # mur droit\n left(45)\n forward(d) # toit droit\n left(90)\n forward(d) # toit gauche\n left(45)\n forward(d) # mur gauche\n left(90)\n end_fill()\n up()\n\nmaison([0, 0], 70, 'lightblue')\nmaison([150, 30], 50, 'yellow')\n\nmaison([-150, -200], 100, \"blue\") \nmaison([-180, 80], 30, \"green\") \n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Drapeau tricolore\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 5 </h3>\n\n1. Modifiez les couleurs pour afficher le drapeau de l'irlande (ou d'un autre pays de votre choix). \n2. Créez une deuxième fonction `drapeau2(d, c, c2, c3)` qui crée un drapeau avec des barres horizontales et utilisez là pour dessiner le drapeau des pays bas (ou d'un autre pays de votre choix).\n\n```Python\nfrom turtle import *\n\ndef rectangle(d, e, c):\n fillcolor(c)\n begin_fill()\n for i in range(2):\n forward(d)\n left(90)\n forward(e)\n left(90)\n end_fill()\n\ndef drapeau(d, c1, c2, c3):\n rectangle(d, 2*d, c1)\n forward(d)\n rectangle(d, 2*d, c2)\n forward(d)\n rectangle(d, 2*d, c3)\n\ndrapeau(50, 'blue', 'white', 'red')\n\ndone()\n\n\n```\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\ndef rectangle(d, e, c):\n fillcolor(c)\n begin_fill()\n for i in range(2):\n forward(d)\n left(90)\n forward(e)\n left(90)\n end_fill()\n\ndef drapeau(d, c1, c2, c3):\n rectangle(d, 2*d, c1)\n forward(d)\n rectangle(d, 2*d, c2)\n forward(d)\n rectangle(d, 2*d, c3)\n\n\ndef drapeau2(d, c1, c2, c3):\n rectangle(4*d, d, c1)\n left(90)\n forward(d)\n right(90)\n rectangle(4*d, d, c2)\n left(90)\n forward(d)\n right(90)\n rectangle(4*d, d, c3)\n\npenup()\ngoto(-200,0)\npendown()\ndrapeau(50, 'green', 'white', 'orange')\n\npenup()\ngoto(50,0)\npendown()\ndrapeau2(50, 'blue', 'white', 'red')\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef rectangle(d, e, c):\n fillcolor(c)\n begin_fill()\n for i in range(2):\n forward(d)\n left(90)\n forward(e)\n left(90)\n end_fill()\n\ndef drapeau(d, c1, c2, c3):\n rectangle(d, 2*d, c1)\n forward(d)\n rectangle(d, 2*d, c2)\n forward(d)\n rectangle(d, 2*d, c3)\n\n\ndef drapeau2(d, c1, c2, c3):\n rectangle(4*d, d, c1)\n left(90)\n forward(d)\n right(90)\n rectangle(4*d, d, c2)\n left(90)\n forward(d)\n right(90)\n rectangle(4*d, d, c3)\n\npenup()\ngoto(-200,0)\npendown()\ndrapeau(50, 'green', 'white', 'orange')\n\npenup()\ngoto(50,0)\npendown()\ndrapeau2(50, 'blue', 'white', 'red')\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Arbre\n\nPour dessiner un arbre simple, nous utilisons un segment droit pour le tronc et un disque (dot) pour le feuillage.\nC'est une fonction qui a 3 paramètres\n\n- `d` -- longueur du tronc\n- `c` -- couleur du tronc\n- `c2` -- couleur du feuillage\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 6 </h3>\n\nDéfinissez et utilisez une fonction `foret(n)` qui dessine `n` arbres.\n\n```Python\nfrom turtle import *\n\ndef arbre(d, c, c2):\n down()\n left(90)\n width(d/6) # tronc\n pencolor(c)\n forward(d)\n dot(d, c2) # feuillage\n up()\n backward(d) # retourner à la position de départ\n right(90)\n\n\narbre(100, 'brown', 'lime')\nforward(70)\narbre(90, 'brown', 'green')\n\ndone()\n```\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\ndef arbre(d, c, c2):\n down()\n left(90)\n width(d/6) # tronc\n pencolor(c)\n forward(d)\n dot(d, c2) # feuillage\n up()\n backward(d) # retourner à la position de départ\n right(90)\n\ndef foret(n):\n for _ in range(n):\n arbre(90, 'brown', 'green')\n forward(40)\n left(90)\n forward(40)\n right(90)\n forward(40)\n\nup()\ngoto(-200,0)\nforet(4) \n \ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef arbre(d, c, c2):\n down()\n left(90)\n width(d/6) # tronc\n pencolor(c)\n forward(d)\n dot(d, c2) # feuillage\n up()\n backward(d) # retourner à la position de départ\n right(90)\n\ndef foret(n):\n for _ in range(n):\n arbre(90, 'brown', 'green')\n forward(40)\n left(90)\n forward(40)\n right(90)\n forward(40)\n\nup()\ngoto(-200,0)\nforet(4) \n \ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Coeur\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 7 </h3>\n\nAjoutez deux paramètres: `w` pour l'épaisseur de la ligne (width), et `c2` pour la couleur de ligne. \nLa fonction aura la forme `coeur(r, w, c, c2)`.\n\n```Python\nfrom turtle import *\n\ndef coeur(r, c):\n down()\n fillcolor(c)\n begin_fill()\n left(90)\n circle(r, 225)\n forward(2.4*r)\n left(90)\n forward(2.4*r)\n circle(r, 225)\n left(90)\n end_fill()\n up()\n\ncoeur(50, 'darkviolet')\nforward(130)\ncoeur(40, 'tomato')\n\ndone()\n```\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\ndef coeur(r, w, c, c2):\n down()\n width(w)\n pencolor(c2)\n fillcolor(c)\n begin_fill()\n left(90)\n circle(r, 225)\n forward(2.4*r)\n left(90)\n forward(2.4*r)\n circle(r, 225)\n left(90)\n end_fill()\n up()\n\ncoeur(50,5, 'darkviolet', \"red\")\nforward(130)\ncoeur(40,2, 'tomato', \"green\")\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef coeur(r, w, c, c2):\n down()\n width(w)\n pencolor(c2)\n fillcolor(c)\n begin_fill()\n left(90)\n circle(r, 225)\n forward(2.4*r)\n left(90)\n forward(2.4*r)\n circle(r, 225)\n left(90)\n end_fill()\n up()\n\ncoeur(50,5, 'darkviolet', \"red\")\nforward(130)\ncoeur(40,2, 'tomato', \"green\")\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Autres exemples de fonction\n\n**Exemple 1: Dessiner un bus**\n\nPour dessiner un bus, une voiture ou un camion simple, nous pouvons utiliser des rectangles pour le châssis, et un disque (dot) pour les roues.\nC'est une fonction qui a comme paramètres\n\n- `p` -- position du bus\n- `d` -- dimension (longeur) du bus\n- `c` -- couleur du bus" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\nup()\n\ndef rectangle(d, e, c):\n fillcolor(c)\n begin_fill()\n for i in range(2):\n forward(d)\n left(90)\n forward(e)\n left(90)\n end_fill()\n\ndef bus(p, d, c):\n goto(p)\n down()\n rectangle(d, d/3, c) # chassis\n forward(d/4)\n dot(d/5) # roue arrière\n dot(d/10, 'white')\n forward(d/2)\n dot(d/5) # roue avant\n dot(d/10, 'white')\n up()\n\nbus([-200, 50], 200, 'red')\nbus([50, 20], 150, 'lightblue')\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\nup()\n\ndef rectangle(d, e, c):\n fillcolor(c)\n begin_fill()\n for i in range(2):\n forward(d)\n left(90)\n forward(e)\n left(90)\n end_fill()\n\ndef bus(p, d, c):\n goto(p)\n down()\n rectangle(d, d/3, c) # chassis\n forward(d/4)\n dot(d/5) # roue arrière\n dot(d/10, 'white')\n forward(d/2)\n dot(d/5) # roue avant\n dot(d/10, 'white')\n up()\n\nbus([-200, 50], 200, 'red')\nbus([50, 20], 150, 'lightblue')\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "**Exemple 2: L'escalier**\n\nPour dessiner un escalier notre fonction aura les paramètres suivants:\n\n- `d` -- longueur de marche\n- `e` -- hauteur de marche\n- `n` -- nombre de marches\n\n" }, { - "metadata": { - "trusted": false, - "scrolled": true - }, "cell_type": "code", - "source": "from turtle import *\n\ndef escalier(d, e, n):\n dot() # marqueur de début\n for i in range(n):\n forward(d)\n left(90)\n forward(e)\n right(90)\n\nescalier(20, 10, 5)\nescalier(10, -20, 5)\nescalier(30, 10, 4)\n\ndone()\n", "execution_count": null, - "outputs": [] + "metadata": { + "scrolled": true, + "trusted": false + }, + "outputs": [], + "source": "from turtle import *\n\ndef escalier(d, e, n):\n dot() # marqueur de début\n for i in range(n):\n forward(d)\n left(90)\n forward(e)\n right(90)\n\nescalier(20, 10, 5)\nescalier(10, -20, 5)\nescalier(30, 10, 4)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Nommer une variable\n\nPour nommer une variable, on utilise les caractères suivants :\n\n- lettres (`a...z` et `A...Z`),\n- chiffres (`0...9`),\n- le tiret bas (`_`).\n\nLe nom de variable :\n\n- est sensible aux majuscules/minuscules (`BUS` et `bus` sont des noms de variables différents),\n- ne peut pas commencer avec un chiffre,\n- ne doit pas consister d'un mot-clé (`def`, `for`, `in`, `from`, ...),\n\nPar exemplee, les noms de variables suivantes sont valides : \n `a2`, `_a`, `speed`, `pos_x`, `POS_X`,\n\ntandis que ceux là ne le sont pas : `2a`, `def`, `pos x`.\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\nLesquels des noms de variable sont valides ?\n\nA) var 2\nB) var2\nC) 2var\nD) IF\n```" }, { - "metadata": {}, "cell_type": "raw", + "metadata": {}, "source": "Votre réponse: " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">\n\nB) `var2`\n \nD) `IF` serait valable car différent du mot clé `if` (rappel : Python est sensible aux majuscules/minuscules)\n \nLes deux autres ne sont pas valables car `var 2` contient une espace et `2var` commence par un chiffre.\n \n</div>\n</details>" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Exercices d'entraînement " }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 8 </h3>\n\nCorrigez le programme ci-dessous afin qu'il affiche un triangle rouge\n\n```Python\nfrom turtle import *\n\ndef triangle_couleur(d, c):\n pencolor(c)\n for i in range(3):\n forward(d)\n left(120)\n\ntriangle_couleur(\"red\", 100)\n\ndone()\n```\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\ndef triangle_couleur(d, c):\n pencolor(c)\n for i in range(3):\n forward(d)\n left(120)\n\ntriangle_couleur(100, \"red\") #il fallait changer l'ordre\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef triangle_couleur(d, c):\n pencolor(c)\n for i in range(3):\n forward(d)\n left(120)\n\ntriangle_couleur(100, \"red\") #il fallait changer l'ordre\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 9 </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 lg, 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.\n\n\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\n# pour être à gauche du canevas\nbackward(250)\n\ndef triangle(l):\n for k in range(3):\n forward(l)\n right(120)\n\n# Code à factoriser\ntriangle(30)\nforward(30)\ntriangle(60)\nforward(60)\ntriangle(90)\nforward(90)\ntriangle(120)\nforward(120)\ntriangle(150)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\n# pour être à gauche du canevas\nbackward(250)\n\ndef triangle(l):\n for k in range(3):\n forward(l)\n right(120)\n\n# Code à factoriser\ntriangle(30)\nforward(30)\ntriangle(60)\nforward(60)\ntriangle(90)\nforward(90)\ntriangle(120)\nforward(120)\ntriangle(150)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 10 </h3>\n\n\nDéfinir une fonction `carre_couleur(d,c )` qui demande à la tortue de\ndessiner des carrés colorés de longueur variés. Elle doit dessiner trois triangles comme sur la figure ci-dessous.\n\n\n\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\ndef carre(l,c):\n pencolor(c)\n for _ in range(4):\n left(90)\n forward(l)\n\nwidth(3)\ncarre(130, \"red\")\nleft(120)\ncarre(100, \"green\")\nleft(120)\ncarre(70, \"pink\")\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef carre(l,c):\n pencolor(c)\n for _ in range(4):\n left(90)\n forward(l)\n\nwidth(3)\ncarre(130, \"red\")\nleft(120)\ncarre(100, \"green\")\nleft(120)\ncarre(70, \"pink\")\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 11 </h3>\n\nDéfinissez une commande `rangee_triangles(nombre, cote)` qui dessine une rangée de pyramides selon l’illustration. Chaque triangle a des côtés de longueur `cote`.\nLe paramètre `nombre` indique le nombre de triangles dans la rangée. Utilisez ensuite\ncette commande pour dessiner une rangée de 20 triangles de côtés 31, centrée au\nmilieu de la fenêtre.\n\n\n\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\ndef rangee_triangles(nombre, cote):\n left(60)\n for _ in range(nombre):\n forward(cote)\n right(120)\n forward(cote)\n left(120)\n\n# mettre à gauche\nup()\nbackward(300)\ndown()\n\n# utiliser la fonction\nrangee_triangles(13, 31)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef rangee_triangles(nombre, cote):\n left(60)\n for _ in range(nombre):\n forward(cote)\n right(120)\n forward(cote)\n left(120)\n\n# mettre à gauche\nup()\nbackward(300)\ndown()\n\n# utiliser la fonction\nrangee_triangles(13, 31)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 12 </h3>\n\nDéfinissez une fonction `maison(h, c)` qui dessine une maison avec une porte de hauteur `h` et de vouleur `c`. \nLes autres dimensions de la maison sont représentées sur l'image ci-dessous.\n\nÉcrire un programme qui utilise la fonction `maison(h, c)` pour reproduire la figure suivante:\n" }, { + "cell_type": "code", + "execution_count": 13, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\n\ndef maison(h, c):\n #deddin de la base\n for _ in range(4):\n forward(80)\n left(90)\n forward(20)\n left(90)\n \n # desin de la porte\n color(c)\n forward(h)\n right(90)\n forward(40)\n right(90)\n forward(h)\n left(90)\n \n color(\"black\")\n forward(20)\n left(90)\n forward(80)\n \n # toit\n color(\"green\")\n left(30)\n forward(80)\n left(120)\n forward(80)\n \n color(\"black\")\n left(30)\n forward(80)\n left(90)\n\n \nspeed(9) # pour dessiner vite\nwidth(2)\n\n# se mettre à gauche du dessin\npenup()\ngoto(-250,0)\npendown()\n# dessiner les maisons porte rouge \nfor _ in range(5):\n maison(40, \"red\")\n penup()\n forward(90)\n pendown()\n\n# se mettre à gauche en bas du dessin\npenup()\ngoto(-250,-200)\npendown()\n# dessiner les maisons porte rouge \nfor _ in range(5):\n maison(60, \"blue\")\n penup()\n forward(90)\n pendown()\n \ndone()", - "execution_count": 13, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"640\" height=\"480\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 2\" opacity=\"0\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"-250\" dur=\" 0.358s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_4.end\"></animate></line><line x1=\"-250\" y1=\"0\" x2=\"-250\" y2=\"0\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_6\" attributename=\"x2\" attributetype=\"XML\" from=\"-250\" to=\"-170\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_5.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_5.end\" from=\"0\" to=\"0\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-170\" y1=\"0\" x2=\"-170\" y2=\"0\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_8\" attributename=\"x2\" attributetype=\"XML\" from=\"-170\" to=\"-170\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_7.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_7.end\" from=\"0\" to=\"-80\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-170\" y1=\"-80\" x2=\"-170\" y2=\"-80\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_10\" attributename=\"x2\" attributetype=\"XML\" from=\"-170\" to=\"-250\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_9.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_9.end\" from=\"-80\" to=\"-80.00000000000001\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-250\" y1=\"-80.00000000000001\" x2=\"-250\" y2=\"-80.00000000000001\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_12\" attributename=\"x2\" attributetype=\"XML\" from=\"-250\" to=\"-250.00000000000003\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_11.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_11.end\" from=\"-80.00000000000001\" to=\"-1.4210854715202004e-14\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-250.00000000000003\" y1=\"-1.4210854715202004e-14\" x2=\"-250.00000000000003\" y2=\"-1.4210854715202004e-14\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_14\" attributename=\"x2\" attributetype=\"XML\" from=\"-250.00000000000003\" to=\"-230.00000000000003\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_13.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_13.end\" from=\"-1.4210854715202004e-14\" to=\"-9.312267518612591e-15\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"-230.00000000000003\" y1=\"-9.312267518612591e-15\" x2=\"-230.00000000000003\" y2=\"-9.312267518612591e-15\" style=\"stroke: red;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_18\" attributename=\"x2\" attributetype=\"XML\" from=\"-230.00000000000003\" to=\"-230.00000000000003\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_17.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_17.end\" from=\"-9.312267518612591e-15\" to=\"-40.00000000000001\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"-230.00000000000003\" y1=\"-40.00000000000001\" x2=\"-230.00000000000003\" y2=\"-40.00000000000001\" style=\"stroke: red;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_20\" attributename=\"x2\" attributetype=\"XML\" from=\"-230.00000000000003\" to=\"-190.00000000000003\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_19.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_19.end\" from=\"-40.00000000000001\" to=\"-40\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"-190.00000000000003\" y1=\"-40\" x2=\"-190.00000000000003\" y2=\"-40\" style=\"stroke: red;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_22\" attributename=\"x2\" attributetype=\"XML\" from=\"-190.00000000000003\" to=\"-190.00000000000003\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_21.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_21.end\" from=\"-40\" to=\"0\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"-190.00000000000003\" y1=\"0\" x2=\"-190.00000000000003\" y2=\"0\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_26\" attributename=\"x2\" attributetype=\"XML\" from=\"-190.00000000000003\" to=\"-170.00000000000003\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_25.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_25.end\" from=\"0\" to=\"4.898587196589413e-15\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"-170.00000000000003\" y1=\"4.898587196589413e-15\" x2=\"-170.00000000000003\" y2=\"4.898587196589413e-15\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_28\" attributename=\"x2\" attributetype=\"XML\" from=\"-170.00000000000003\" to=\"-170\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_27.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_27.end\" from=\"4.898587196589413e-15\" to=\"-80\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-170\" y1=\"-80\" x2=\"-170\" y2=\"-80\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_32\" attributename=\"x2\" attributetype=\"XML\" from=\"-170\" to=\"-209.99999999999994\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_31.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_31.end\" from=\"-80\" to=\"-149.2820323027551\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-209.99999999999994\" y1=\"-149.2820323027551\" x2=\"-209.99999999999994\" y2=\"-149.2820323027551\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_34\" attributename=\"x2\" attributetype=\"XML\" from=\"-209.99999999999994\" to=\"-249.99999999999994\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_33.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_33.end\" from=\"-149.2820323027551\" to=\"-80.00000000000001\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-249.99999999999994\" y1=\"-80.00000000000001\" x2=\"-249.99999999999994\" y2=\"-80.00000000000001\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_38\" attributename=\"x2\" attributetype=\"XML\" from=\"-249.99999999999994\" to=\"-249.99999999999997\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_37.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_37.end\" from=\"-80.00000000000001\" to=\"-1.4210854715202004e-14\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-249.99999999999997\" y1=\"-1.4210854715202004e-14\" x2=\"-249.99999999999997\" y2=\"-1.4210854715202004e-14\" style=\"stroke: black;stroke-width: 2\" opacity=\"0\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_40\" attributename=\"x2\" attributetype=\"XML\" from=\"-249.99999999999997\" to=\"-159.99999999999997\" dur=\" 0.129s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_39.end\"></animate></line><line x1=\"-159.99999999999997\" y1=\"2.987643005410271e-14\" x2=\"-159.99999999999997\" y2=\"2.987643005410271e-14\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_41\" attributename=\"x2\" attributetype=\"XML\" from=\"-159.99999999999997\" to=\"-79.99999999999997\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_40.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_40.end\" from=\"2.987643005410271e-14\" to=\"6.906512762681802e-14\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-79.99999999999997\" y1=\"6.906512762681802e-14\" x2=\"-79.99999999999997\" y2=\"6.906512762681802e-14\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_43\" attributename=\"x2\" attributetype=\"XML\" from=\"-79.99999999999997\" to=\"-79.99999999999993\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_42.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_42.end\" from=\"6.906512762681802e-14\" to=\"-79.99999999999993\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-79.99999999999993\" y1=\"-79.99999999999993\" x2=\"-79.99999999999993\" y2=\"-79.99999999999993\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_45\" attributename=\"x2\" attributetype=\"XML\" from=\"-79.99999999999993\" to=\"-159.99999999999994\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_44.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_44.end\" from=\"-79.99999999999993\" to=\"-79.99999999999997\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-159.99999999999994\" y1=\"-79.99999999999997\" x2=\"-159.99999999999994\" y2=\"-79.99999999999997\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_47\" attributename=\"x2\" attributetype=\"XML\" from=\"-159.99999999999994\" to=\"-159.99999999999986\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_46.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_46.end\" from=\"-79.99999999999997\" to=\"2.842170943040401e-14\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-159.99999999999986\" y1=\"2.842170943040401e-14\" x2=\"-159.99999999999986\" y2=\"2.842170943040401e-14\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_49\" attributename=\"x2\" attributetype=\"XML\" from=\"-159.99999999999986\" to=\"-139.99999999999986\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_48.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_48.end\" from=\"2.842170943040401e-14\" to=\"4.3117471020172244e-14\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"-139.99999999999986\" y1=\"4.3117471020172244e-14\" x2=\"-139.99999999999986\" y2=\"4.3117471020172244e-14\" style=\"stroke: red;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_53\" attributename=\"x2\" attributetype=\"XML\" from=\"-139.99999999999986\" to=\"-139.9999999999999\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_52.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_52.end\" from=\"4.3117471020172244e-14\" to=\"-39.99999999999996\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"-139.9999999999999\" y1=\"-39.99999999999996\" x2=\"-139.9999999999999\" y2=\"-39.99999999999996\" style=\"stroke: red;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_55\" attributename=\"x2\" attributetype=\"XML\" from=\"-139.9999999999999\" to=\"-99.99999999999989\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_54.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_54.end\" from=\"-39.99999999999996\" to=\"-39.99999999999993\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"-99.99999999999989\" y1=\"-39.99999999999993\" x2=\"-99.99999999999989\" y2=\"-39.99999999999993\" style=\"stroke: red;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_57\" attributename=\"x2\" attributetype=\"XML\" from=\"-99.99999999999989\" to=\"-99.99999999999984\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_56.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_56.end\" from=\"-39.99999999999993\" to=\"7.105427357601002e-14\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"-99.99999999999984\" y1=\"7.105427357601002e-14\" x2=\"-99.99999999999984\" y2=\"7.105427357601002e-14\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_61\" attributename=\"x2\" attributetype=\"XML\" from=\"-99.99999999999984\" to=\"-79.99999999999984\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_60.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_60.end\" from=\"7.105427357601002e-14\" to=\"8.575003516577826e-14\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"-79.99999999999984\" y1=\"8.575003516577826e-14\" x2=\"-79.99999999999984\" y2=\"8.575003516577826e-14\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_63\" attributename=\"x2\" attributetype=\"XML\" from=\"-79.99999999999984\" to=\"-79.99999999999993\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_62.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_62.end\" from=\"8.575003516577826e-14\" to=\"-79.99999999999991\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-79.99999999999993\" y1=\"-79.99999999999991\" x2=\"-79.99999999999993\" y2=\"-79.99999999999991\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_67\" attributename=\"x2\" attributetype=\"XML\" from=\"-79.99999999999993\" to=\"-119.99999999999996\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_66.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_66.end\" from=\"-79.99999999999991\" to=\"-149.282032302755\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-119.99999999999996\" y1=\"-149.282032302755\" x2=\"-119.99999999999996\" y2=\"-149.282032302755\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_69\" attributename=\"x2\" attributetype=\"XML\" from=\"-119.99999999999996\" to=\"-160.0000000000001\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_68.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_68.end\" from=\"-149.282032302755\" to=\"-79.99999999999999\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-160.0000000000001\" y1=\"-79.99999999999999\" x2=\"-160.0000000000001\" y2=\"-79.99999999999999\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_73\" attributename=\"x2\" attributetype=\"XML\" from=\"-160.0000000000001\" to=\"-160.00000000000006\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_72.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_72.end\" from=\"-79.99999999999999\" to=\"1.4210854715202004e-14\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-160.00000000000006\" y1=\"1.4210854715202004e-14\" x2=\"-160.00000000000006\" y2=\"1.4210854715202004e-14\" style=\"stroke: black;stroke-width: 2\" opacity=\"0\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_75\" attributename=\"x2\" attributetype=\"XML\" from=\"-160.00000000000006\" to=\"-70.00000000000006\" dur=\" 0.129s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_74.end\"></animate></line><line x1=\"-70.00000000000006\" y1=\"1.0238542425381144e-13\" x2=\"-70.00000000000006\" y2=\"1.0238542425381144e-13\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_76\" attributename=\"x2\" attributetype=\"XML\" from=\"-70.00000000000006\" to=\"9.999999999999943\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_75.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_75.end\" from=\"1.0238542425381144e-13\" to=\"1.8076281939924206e-13\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"9.999999999999943\" y1=\"1.8076281939924206e-13\" x2=\"9.999999999999943\" y2=\"1.8076281939924206e-13\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_78\" attributename=\"x2\" attributetype=\"XML\" from=\"9.999999999999943\" to=\"9.999999999999885\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_77.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_77.end\" from=\"1.8076281939924206e-13\" to=\"-79.99999999999982\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"9.999999999999885\" y1=\"-79.99999999999982\" x2=\"9.999999999999885\" y2=\"-79.99999999999982\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_80\" attributename=\"x2\" attributetype=\"XML\" from=\"9.999999999999885\" to=\"-70.00000000000011\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_79.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_79.end\" from=\"-79.99999999999982\" to=\"-79.9999999999999\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-70.00000000000011\" y1=\"-79.9999999999999\" x2=\"-70.00000000000011\" y2=\"-79.9999999999999\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_82\" attributename=\"x2\" attributetype=\"XML\" from=\"-70.00000000000011\" to=\"-70.00000000000007\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_81.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_81.end\" from=\"-79.9999999999999\" to=\"9.947598300641403e-14\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-70.00000000000007\" y1=\"9.947598300641403e-14\" x2=\"-70.00000000000007\" y2=\"9.947598300641403e-14\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_84\" attributename=\"x2\" attributetype=\"XML\" from=\"-70.00000000000007\" to=\"-50.00000000000007\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_83.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_83.end\" from=\"9.947598300641403e-14\" to=\"1.2396891898936108e-13\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"-50.00000000000007\" y1=\"1.2396891898936108e-13\" x2=\"-50.00000000000007\" y2=\"1.2396891898936108e-13\" style=\"stroke: red;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_88\" attributename=\"x2\" attributetype=\"XML\" from=\"-50.00000000000007\" to=\"-50.00000000000009\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_87.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_87.end\" from=\"1.2396891898936108e-13\" to=\"-39.99999999999988\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"-50.00000000000009\" y1=\"-39.99999999999988\" x2=\"-50.00000000000009\" y2=\"-39.99999999999988\" style=\"stroke: red;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_90\" attributename=\"x2\" attributetype=\"XML\" from=\"-50.00000000000009\" to=\"-10.000000000000092\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_89.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_89.end\" from=\"-39.99999999999988\" to=\"-39.99999999999983\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"-10.000000000000092\" y1=\"-39.99999999999983\" x2=\"-10.000000000000092\" y2=\"-39.99999999999983\" style=\"stroke: red;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_92\" attributename=\"x2\" attributetype=\"XML\" from=\"-10.000000000000092\" to=\"-10.000000000000068\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_91.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_91.end\" from=\"-39.99999999999983\" to=\"1.7053025658242404e-13\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"-10.000000000000068\" y1=\"1.7053025658242404e-13\" x2=\"-10.000000000000068\" y2=\"1.7053025658242404e-13\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_96\" attributename=\"x2\" attributetype=\"XML\" from=\"-10.000000000000068\" to=\"9.999999999999932\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_95.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_95.end\" from=\"1.7053025658242404e-13\" to=\"1.950231925653711e-13\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"9.999999999999932\" y1=\"1.950231925653711e-13\" x2=\"9.999999999999932\" y2=\"1.950231925653711e-13\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_98\" attributename=\"x2\" attributetype=\"XML\" from=\"9.999999999999932\" to=\"9.999999999999893\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_97.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_97.end\" from=\"1.950231925653711e-13\" to=\"-79.9999999999998\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"9.999999999999893\" y1=\"-79.9999999999998\" x2=\"9.999999999999893\" y2=\"-79.9999999999998\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_102\" attributename=\"x2\" attributetype=\"XML\" from=\"9.999999999999893\" to=\"-29.99999999999985\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_101.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_101.end\" from=\"-79.9999999999998\" to=\"-149.28203230275506\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-29.99999999999985\" y1=\"-149.28203230275506\" x2=\"-29.99999999999985\" y2=\"-149.28203230275506\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_104\" attributename=\"x2\" attributetype=\"XML\" from=\"-29.99999999999985\" to=\"-69.99999999999979\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_103.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_103.end\" from=\"-149.28203230275506\" to=\"-79.99999999999993\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-69.99999999999979\" y1=\"-79.99999999999993\" x2=\"-69.99999999999979\" y2=\"-79.99999999999993\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_108\" attributename=\"x2\" attributetype=\"XML\" from=\"-69.99999999999979\" to=\"-70.00000000000004\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_107.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_107.end\" from=\"-79.99999999999993\" to=\"7.105427357601002e-14\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-70.00000000000004\" y1=\"7.105427357601002e-14\" x2=\"-70.00000000000004\" y2=\"7.105427357601002e-14\" style=\"stroke: black;stroke-width: 2\" opacity=\"0\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_110\" attributename=\"x2\" attributetype=\"XML\" from=\"-70.00000000000004\" to=\"19.999999999999957\" dur=\" 0.129s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_109.end\"></animate></line><line x1=\"19.999999999999957\" y1=\"2.0331612788392416e-13\" x2=\"19.999999999999957\" y2=\"2.0331612788392416e-13\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_111\" attributename=\"x2\" attributetype=\"XML\" from=\"19.999999999999957\" to=\"99.99999999999996\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_110.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_110.end\" from=\"2.0331612788392416e-13\" to=\"3.2088222060207e-13\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"99.99999999999996\" y1=\"3.2088222060207e-13\" x2=\"99.99999999999996\" y2=\"3.2088222060207e-13\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_113\" attributename=\"x2\" attributetype=\"XML\" from=\"99.99999999999996\" to=\"99.99999999999994\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_112.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_112.end\" from=\"3.2088222060207e-13\" to=\"-79.99999999999967\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"99.99999999999994\" y1=\"-79.99999999999967\" x2=\"99.99999999999994\" y2=\"-79.99999999999967\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_115\" attributename=\"x2\" attributetype=\"XML\" from=\"99.99999999999994\" to=\"19.999999999999943\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_114.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_114.end\" from=\"-79.99999999999967\" to=\"-79.99999999999952\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"19.999999999999943\" y1=\"-79.99999999999952\" x2=\"19.999999999999943\" y2=\"-79.99999999999952\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_117\" attributename=\"x2\" attributetype=\"XML\" from=\"19.999999999999943\" to=\"19.99999999999967\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_116.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_116.end\" from=\"-79.99999999999952\" to=\"4.831690603168681e-13\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"19.99999999999967\" y1=\"4.831690603168681e-13\" x2=\"19.99999999999967\" y2=\"4.831690603168681e-13\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_119\" attributename=\"x2\" attributetype=\"XML\" from=\"19.99999999999967\" to=\"39.99999999999967\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_118.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_118.end\" from=\"4.831690603168681e-13\" to=\"5.17459170692994e-13\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"39.99999999999967\" y1=\"5.17459170692994e-13\" x2=\"39.99999999999967\" y2=\"5.17459170692994e-13\" style=\"stroke: red;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_123\" attributename=\"x2\" attributetype=\"XML\" from=\"39.99999999999967\" to=\"39.99999999999967\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_122.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_122.end\" from=\"5.17459170692994e-13\" to=\"-39.99999999999948\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"39.99999999999967\" y1=\"-39.99999999999948\" x2=\"39.99999999999967\" y2=\"-39.99999999999948\" style=\"stroke: red;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_125\" attributename=\"x2\" attributetype=\"XML\" from=\"39.99999999999967\" to=\"79.99999999999967\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_124.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_124.end\" from=\"-39.99999999999948\" to=\"-39.99999999999941\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"79.99999999999967\" y1=\"-39.99999999999941\" x2=\"79.99999999999967\" y2=\"-39.99999999999941\" style=\"stroke: red;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_127\" attributename=\"x2\" attributetype=\"XML\" from=\"79.99999999999967\" to=\"79.99999999999953\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_126.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_126.end\" from=\"-39.99999999999941\" to=\"5.897504706808832e-13\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"79.99999999999953\" y1=\"5.897504706808832e-13\" x2=\"79.99999999999953\" y2=\"5.897504706808832e-13\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_131\" attributename=\"x2\" attributetype=\"XML\" from=\"79.99999999999953\" to=\"99.99999999999953\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_130.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_130.end\" from=\"5.897504706808832e-13\" to=\"6.24040581057009e-13\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"99.99999999999953\" y1=\"6.24040581057009e-13\" x2=\"99.99999999999953\" y2=\"6.24040581057009e-13\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_133\" attributename=\"x2\" attributetype=\"XML\" from=\"99.99999999999953\" to=\"99.99999999999953\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_132.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_132.end\" from=\"6.24040581057009e-13\" to=\"-79.99999999999937\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"99.99999999999953\" y1=\"-79.99999999999937\" x2=\"99.99999999999953\" y2=\"-79.99999999999937\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_137\" attributename=\"x2\" attributetype=\"XML\" from=\"99.99999999999953\" to=\"59.99999999999982\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_136.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_136.end\" from=\"-79.99999999999937\" to=\"-149.28203230275463\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"59.99999999999982\" y1=\"-149.28203230275463\" x2=\"59.99999999999982\" y2=\"-149.28203230275463\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_139\" attributename=\"x2\" attributetype=\"XML\" from=\"59.99999999999982\" to=\"19.999999999999858\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_138.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_138.end\" from=\"-149.28203230275463\" to=\"-79.99999999999952\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"19.999999999999858\" y1=\"-79.99999999999952\" x2=\"19.999999999999858\" y2=\"-79.99999999999952\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_143\" attributename=\"x2\" attributetype=\"XML\" from=\"19.999999999999858\" to=\"19.999999999999563\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_142.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_142.end\" from=\"-79.99999999999952\" to=\"4.831690603168681e-13\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"19.999999999999563\" y1=\"4.831690603168681e-13\" x2=\"19.999999999999563\" y2=\"4.831690603168681e-13\" style=\"stroke: black;stroke-width: 2\" opacity=\"0\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_145\" attributename=\"x2\" attributetype=\"XML\" from=\"19.999999999999563\" to=\"109.99999999999956\" dur=\" 0.129s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_144.end\"></animate></line><line x1=\"109.99999999999956\" y1=\"6.595181993940869e-13\" x2=\"109.99999999999956\" y2=\"6.595181993940869e-13\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_146\" attributename=\"x2\" attributetype=\"XML\" from=\"109.99999999999956\" to=\"189.99999999999955\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_145.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_145.end\" from=\"6.595181993940869e-13\" to=\"8.162729896849481e-13\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"189.99999999999955\" y1=\"8.162729896849481e-13\" x2=\"189.99999999999955\" y2=\"8.162729896849481e-13\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_148\" attributename=\"x2\" attributetype=\"XML\" from=\"189.99999999999955\" to=\"189.99999999999957\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_147.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_147.end\" from=\"8.162729896849481e-13\" to=\"-79.99999999999919\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"189.99999999999957\" y1=\"-79.99999999999919\" x2=\"189.99999999999957\" y2=\"-79.99999999999919\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_150\" attributename=\"x2\" attributetype=\"XML\" from=\"189.99999999999957\" to=\"109.99999999999957\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_149.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_149.end\" from=\"-79.99999999999919\" to=\"-79.99999999999908\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"109.99999999999957\" y1=\"-79.99999999999908\" x2=\"109.99999999999957\" y2=\"-79.99999999999908\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_152\" attributename=\"x2\" attributetype=\"XML\" from=\"109.99999999999957\" to=\"109.99999999999926\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_151.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_151.end\" from=\"-79.99999999999908\" to=\"9.237055564881302e-13\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"109.99999999999926\" y1=\"9.237055564881302e-13\" x2=\"109.99999999999926\" y2=\"9.237055564881302e-13\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_154\" attributename=\"x2\" attributetype=\"XML\" from=\"109.99999999999926\" to=\"129.99999999999926\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_153.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_153.end\" from=\"9.237055564881302e-13\" to=\"9.677928412574349e-13\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"129.99999999999926\" y1=\"9.677928412574349e-13\" x2=\"129.99999999999926\" y2=\"9.677928412574349e-13\" style=\"stroke: red;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_158\" attributename=\"x2\" attributetype=\"XML\" from=\"129.99999999999926\" to=\"129.9999999999993\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_157.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_157.end\" from=\"9.677928412574349e-13\" to=\"-39.999999999999034\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"129.9999999999993\" y1=\"-39.999999999999034\" x2=\"129.9999999999993\" y2=\"-39.999999999999034\" style=\"stroke: red;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_160\" attributename=\"x2\" attributetype=\"XML\" from=\"129.9999999999993\" to=\"169.9999999999993\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_159.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_159.end\" from=\"-39.999999999999034\" to=\"-39.99999999999895\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"169.9999999999993\" y1=\"-39.99999999999895\" x2=\"169.9999999999993\" y2=\"-39.99999999999895\" style=\"stroke: red;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_162\" attributename=\"x2\" attributetype=\"XML\" from=\"169.9999999999993\" to=\"169.99999999999912\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_161.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_161.end\" from=\"-39.99999999999895\" to=\"1.0516032489249483e-12\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"169.99999999999912\" y1=\"1.0516032489249483e-12\" x2=\"169.99999999999912\" y2=\"1.0516032489249483e-12\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_166\" attributename=\"x2\" attributetype=\"XML\" from=\"169.99999999999912\" to=\"189.99999999999912\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_165.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_165.end\" from=\"1.0516032489249483e-12\" to=\"1.095690533694253e-12\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"189.99999999999912\" y1=\"1.095690533694253e-12\" x2=\"189.99999999999912\" y2=\"1.095690533694253e-12\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_168\" attributename=\"x2\" attributetype=\"XML\" from=\"189.99999999999912\" to=\"189.99999999999915\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_167.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_167.end\" from=\"1.095690533694253e-12\" to=\"-79.9999999999989\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"189.99999999999915\" y1=\"-79.9999999999989\" x2=\"189.99999999999915\" y2=\"-79.9999999999989\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_172\" attributename=\"x2\" attributetype=\"XML\" from=\"189.99999999999915\" to=\"149.99999999999898\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_171.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_171.end\" from=\"-79.9999999999989\" to=\"-149.2820323027539\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"149.99999999999898\" y1=\"-149.2820323027539\" x2=\"149.99999999999898\" y2=\"-149.2820323027539\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_174\" attributename=\"x2\" attributetype=\"XML\" from=\"149.99999999999898\" to=\"109.99999999999898\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_173.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_173.end\" from=\"-149.2820323027539\" to=\"-79.9999999999988\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"109.99999999999898\" y1=\"-79.9999999999988\" x2=\"109.99999999999898\" y2=\"-79.9999999999988\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_178\" attributename=\"x2\" attributetype=\"XML\" from=\"109.99999999999898\" to=\"109.99999999999865\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_177.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_177.end\" from=\"-79.9999999999988\" to=\"1.1937117960769683e-12\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"109.99999999999865\" y1=\"1.1937117960769683e-12\" x2=\"109.99999999999865\" y2=\"1.1937117960769683e-12\" style=\"stroke: black;stroke-width: 2\" opacity=\"0\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_180\" attributename=\"x2\" attributetype=\"XML\" from=\"109.99999999999865\" to=\"199.99999999999864\" dur=\" 0.129s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_179.end\"></animate></line><line x1=\"199.99999999999864\" y1=\"1.414148219923492e-12\" x2=\"199.99999999999864\" y2=\"1.414148219923492e-12\" style=\"stroke: black;stroke-width: 2\" opacity=\"0\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_181\" attributename=\"x2\" attributetype=\"XML\" from=\"199.99999999999864\" to=\"-250\" dur=\" 0.931s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_180.end\"></animate></line><line x1=\"-250\" y1=\"200\" x2=\"-250\" y2=\"200\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_182\" attributename=\"x2\" attributetype=\"XML\" from=\"-250\" to=\"-170\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_181.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_181.end\" from=\"200\" to=\"200.0000000000002\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-170\" y1=\"200.0000000000002\" x2=\"-170\" y2=\"200.0000000000002\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_184\" attributename=\"x2\" attributetype=\"XML\" from=\"-170\" to=\"-169.99999999999937\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_183.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_183.end\" from=\"200.0000000000002\" to=\"120.0000000000002\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-169.99999999999937\" y1=\"120.0000000000002\" x2=\"-169.99999999999937\" y2=\"120.0000000000002\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_186\" attributename=\"x2\" attributetype=\"XML\" from=\"-169.99999999999937\" to=\"-249.99999999999937\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_185.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_185.end\" from=\"120.0000000000002\" to=\"120.00000000000028\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-249.99999999999937\" y1=\"120.00000000000028\" x2=\"-249.99999999999937\" y2=\"120.00000000000028\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_188\" attributename=\"x2\" attributetype=\"XML\" from=\"-249.99999999999937\" to=\"-249.99999999999972\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_187.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_187.end\" from=\"120.00000000000028\" to=\"200.00000000000028\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-249.99999999999972\" y1=\"200.00000000000028\" x2=\"-249.99999999999972\" y2=\"200.00000000000028\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_190\" attributename=\"x2\" attributetype=\"XML\" from=\"-249.99999999999972\" to=\"-229.99999999999972\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_189.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_189.end\" from=\"200.00000000000028\" to=\"200.0000000000002\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"-229.99999999999972\" y1=\"200.0000000000002\" x2=\"-229.99999999999972\" y2=\"200.0000000000002\" style=\"stroke: blue;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_194\" attributename=\"x2\" attributetype=\"XML\" from=\"-229.99999999999972\" to=\"-229.99999999999966\" dur=\" 0.086s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_193.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_193.end\" from=\"200.0000000000002\" to=\"140.0000000000002\" dur=\" 0.086s\" fill=\"freeze\"></animate></line><line x1=\"-229.99999999999966\" y1=\"140.0000000000002\" x2=\"-229.99999999999966\" y2=\"140.0000000000002\" style=\"stroke: blue;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_196\" attributename=\"x2\" attributetype=\"XML\" from=\"-229.99999999999966\" to=\"-189.99999999999966\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_195.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_195.end\" from=\"140.0000000000002\" to=\"140.00000000000003\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"-189.99999999999966\" y1=\"140.00000000000003\" x2=\"-189.99999999999966\" y2=\"140.00000000000003\" style=\"stroke: blue;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_198\" attributename=\"x2\" attributetype=\"XML\" from=\"-189.99999999999966\" to=\"-189.99999999999991\" dur=\" 0.086s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_197.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_197.end\" from=\"140.00000000000003\" to=\"200.00000000000003\" dur=\" 0.086s\" fill=\"freeze\"></animate></line><line x1=\"-189.99999999999991\" y1=\"200.00000000000003\" x2=\"-189.99999999999991\" y2=\"200.00000000000003\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_202\" attributename=\"x2\" attributetype=\"XML\" from=\"-189.99999999999991\" to=\"-169.99999999999991\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_201.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_201.end\" from=\"200.00000000000003\" to=\"199.99999999999994\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"-169.99999999999991\" y1=\"199.99999999999994\" x2=\"-169.99999999999991\" y2=\"199.99999999999994\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_204\" attributename=\"x2\" attributetype=\"XML\" from=\"-169.99999999999991\" to=\"-169.99999999999983\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_203.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_203.end\" from=\"199.99999999999994\" to=\"119.99999999999994\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-169.99999999999983\" y1=\"119.99999999999994\" x2=\"-169.99999999999983\" y2=\"119.99999999999994\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_208\" attributename=\"x2\" attributetype=\"XML\" from=\"-169.99999999999983\" to=\"-209.99999999999997\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_207.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_207.end\" from=\"119.99999999999994\" to=\"50.71796769724493\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-209.99999999999997\" y1=\"50.71796769724493\" x2=\"-209.99999999999997\" y2=\"50.71796769724493\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_210\" attributename=\"x2\" attributetype=\"XML\" from=\"-209.99999999999997\" to=\"-250\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_209.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_209.end\" from=\"50.71796769724493\" to=\"120\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-250\" y1=\"120\" x2=\"-250\" y2=\"120\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_214\" attributename=\"x2\" attributetype=\"XML\" from=\"-250\" to=\"-249.9999999999998\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_213.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_213.end\" from=\"120\" to=\"200\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-249.9999999999998\" y1=\"200\" x2=\"-249.9999999999998\" y2=\"200\" style=\"stroke: black;stroke-width: 2\" opacity=\"0\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_216\" attributename=\"x2\" attributetype=\"XML\" from=\"-249.9999999999998\" to=\"-159.9999999999998\" dur=\" 0.129s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_215.end\"></animate></line><line x1=\"-159.9999999999998\" y1=\"200.00000000000026\" x2=\"-159.9999999999998\" y2=\"200.00000000000026\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_217\" attributename=\"x2\" attributetype=\"XML\" from=\"-159.9999999999998\" to=\"-79.9999999999998\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_216.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_216.end\" from=\"200.00000000000026\" to=\"200.00000000000048\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-79.9999999999998\" y1=\"200.00000000000048\" x2=\"-79.9999999999998\" y2=\"200.00000000000048\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_219\" attributename=\"x2\" attributetype=\"XML\" from=\"-79.9999999999998\" to=\"-79.99999999999913\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_218.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_218.end\" from=\"200.00000000000048\" to=\"120.00000000000048\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-79.99999999999913\" y1=\"120.00000000000048\" x2=\"-79.99999999999913\" y2=\"120.00000000000048\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_221\" attributename=\"x2\" attributetype=\"XML\" from=\"-79.99999999999913\" to=\"-159.99999999999915\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_220.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_220.end\" from=\"120.00000000000048\" to=\"120.00000000000053\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-159.99999999999915\" y1=\"120.00000000000053\" x2=\"-159.99999999999915\" y2=\"120.00000000000053\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_223\" attributename=\"x2\" attributetype=\"XML\" from=\"-159.99999999999915\" to=\"-159.99999999999955\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_222.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_222.end\" from=\"120.00000000000053\" to=\"200.0000000000005\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-159.99999999999955\" y1=\"200.0000000000005\" x2=\"-159.99999999999955\" y2=\"200.0000000000005\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_225\" attributename=\"x2\" attributetype=\"XML\" from=\"-159.99999999999955\" to=\"-139.99999999999955\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_224.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_224.end\" from=\"200.0000000000005\" to=\"200.00000000000043\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"-139.99999999999955\" y1=\"200.00000000000043\" x2=\"-139.99999999999955\" y2=\"200.00000000000043\" style=\"stroke: blue;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_229\" attributename=\"x2\" attributetype=\"XML\" from=\"-139.99999999999955\" to=\"-139.99999999999946\" dur=\" 0.086s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_228.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_228.end\" from=\"200.00000000000043\" to=\"140.00000000000043\" dur=\" 0.086s\" fill=\"freeze\"></animate></line><line x1=\"-139.99999999999946\" y1=\"140.00000000000043\" x2=\"-139.99999999999946\" y2=\"140.00000000000043\" style=\"stroke: blue;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_231\" attributename=\"x2\" attributetype=\"XML\" from=\"-139.99999999999946\" to=\"-99.99999999999946\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_230.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_230.end\" from=\"140.00000000000043\" to=\"140.00000000000026\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"-99.99999999999946\" y1=\"140.00000000000026\" x2=\"-99.99999999999946\" y2=\"140.00000000000026\" style=\"stroke: blue;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_233\" attributename=\"x2\" attributetype=\"XML\" from=\"-99.99999999999946\" to=\"-99.99999999999976\" dur=\" 0.086s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_232.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_232.end\" from=\"140.00000000000026\" to=\"200.00000000000026\" dur=\" 0.086s\" fill=\"freeze\"></animate></line><line x1=\"-99.99999999999976\" y1=\"200.00000000000026\" x2=\"-99.99999999999976\" y2=\"200.00000000000026\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_237\" attributename=\"x2\" attributetype=\"XML\" from=\"-99.99999999999976\" to=\"-79.99999999999976\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_236.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_236.end\" from=\"200.00000000000026\" to=\"200.00000000000017\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"-79.99999999999976\" y1=\"200.00000000000017\" x2=\"-79.99999999999976\" y2=\"200.00000000000017\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_239\" attributename=\"x2\" attributetype=\"XML\" from=\"-79.99999999999976\" to=\"-79.99999999999964\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_238.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_238.end\" from=\"200.00000000000017\" to=\"120.00000000000017\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-79.99999999999964\" y1=\"120.00000000000017\" x2=\"-79.99999999999964\" y2=\"120.00000000000017\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_243\" attributename=\"x2\" attributetype=\"XML\" from=\"-79.99999999999964\" to=\"-119.99999999999974\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_242.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_242.end\" from=\"120.00000000000017\" to=\"50.71796769724514\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-119.99999999999974\" y1=\"50.71796769724514\" x2=\"-119.99999999999974\" y2=\"50.71796769724514\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_245\" attributename=\"x2\" attributetype=\"XML\" from=\"-119.99999999999974\" to=\"-159.99999999999983\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_244.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_244.end\" from=\"50.71796769724514\" to=\"120.0000000000002\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-159.99999999999983\" y1=\"120.0000000000002\" x2=\"-159.99999999999983\" y2=\"120.0000000000002\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_249\" attributename=\"x2\" attributetype=\"XML\" from=\"-159.99999999999983\" to=\"-159.99999999999966\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_248.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_248.end\" from=\"120.0000000000002\" to=\"200.0000000000002\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-159.99999999999966\" y1=\"200.0000000000002\" x2=\"-159.99999999999966\" y2=\"200.0000000000002\" style=\"stroke: black;stroke-width: 2\" opacity=\"0\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_251\" attributename=\"x2\" attributetype=\"XML\" from=\"-159.99999999999966\" to=\"-69.99999999999966\" dur=\" 0.129s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_250.end\"></animate></line><line x1=\"-69.99999999999966\" y1=\"200.0000000000005\" x2=\"-69.99999999999966\" y2=\"200.0000000000005\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_252\" attributename=\"x2\" attributetype=\"XML\" from=\"-69.99999999999966\" to=\"10.000000000000341\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_251.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_251.end\" from=\"200.0000000000005\" to=\"200.0000000000008\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"10.000000000000341\" y1=\"200.0000000000008\" x2=\"10.000000000000341\" y2=\"200.0000000000008\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_254\" attributename=\"x2\" attributetype=\"XML\" from=\"10.000000000000341\" to=\"9.99999999999991\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_253.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_253.end\" from=\"200.0000000000008\" to=\"120.0000000000008\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"9.99999999999991\" y1=\"120.0000000000008\" x2=\"9.99999999999991\" y2=\"120.0000000000008\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_256\" attributename=\"x2\" attributetype=\"XML\" from=\"9.99999999999991\" to=\"-70.00000000000009\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_255.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_255.end\" from=\"120.0000000000008\" to=\"120.0000000000008\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-70.00000000000009\" y1=\"120.0000000000008\" x2=\"-70.00000000000009\" y2=\"120.0000000000008\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_258\" attributename=\"x2\" attributetype=\"XML\" from=\"-70.00000000000009\" to=\"-70.00000000000051\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_257.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_257.end\" from=\"120.0000000000008\" to=\"200.0000000000008\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-70.00000000000051\" y1=\"200.0000000000008\" x2=\"-70.00000000000051\" y2=\"200.0000000000008\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_260\" attributename=\"x2\" attributetype=\"XML\" from=\"-70.00000000000051\" to=\"-50.00000000000051\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_259.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_259.end\" from=\"200.0000000000008\" to=\"200.00000000000074\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"-50.00000000000051\" y1=\"200.00000000000074\" x2=\"-50.00000000000051\" y2=\"200.00000000000074\" style=\"stroke: blue;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_264\" attributename=\"x2\" attributetype=\"XML\" from=\"-50.00000000000051\" to=\"-50.00000000000039\" dur=\" 0.086s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_263.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_263.end\" from=\"200.00000000000074\" to=\"140.00000000000074\" dur=\" 0.086s\" fill=\"freeze\"></animate></line><line x1=\"-50.00000000000039\" y1=\"140.00000000000074\" x2=\"-50.00000000000039\" y2=\"140.00000000000074\" style=\"stroke: blue;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_266\" attributename=\"x2\" attributetype=\"XML\" from=\"-50.00000000000039\" to=\"-10.00000000000039\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_265.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_265.end\" from=\"140.00000000000074\" to=\"140.0000000000006\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"-10.00000000000039\" y1=\"140.0000000000006\" x2=\"-10.00000000000039\" y2=\"140.0000000000006\" style=\"stroke: blue;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_268\" attributename=\"x2\" attributetype=\"XML\" from=\"-10.00000000000039\" to=\"-10.000000000000714\" dur=\" 0.086s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_267.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_267.end\" from=\"140.0000000000006\" to=\"200.0000000000006\" dur=\" 0.086s\" fill=\"freeze\"></animate></line><line x1=\"-10.000000000000714\" y1=\"200.0000000000006\" x2=\"-10.000000000000714\" y2=\"200.0000000000006\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_272\" attributename=\"x2\" attributetype=\"XML\" from=\"-10.000000000000714\" to=\"9.999999999999286\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_271.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_271.end\" from=\"200.0000000000006\" to=\"200.00000000000054\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"9.999999999999286\" y1=\"200.00000000000054\" x2=\"9.999999999999286\" y2=\"200.00000000000054\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_274\" attributename=\"x2\" attributetype=\"XML\" from=\"9.999999999999286\" to=\"9.999999999999442\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_273.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_273.end\" from=\"200.00000000000054\" to=\"120.00000000000054\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"9.999999999999442\" y1=\"120.00000000000054\" x2=\"9.999999999999442\" y2=\"120.00000000000054\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_278\" attributename=\"x2\" attributetype=\"XML\" from=\"9.999999999999442\" to=\"-30.00000000000063\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_277.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_277.end\" from=\"120.00000000000054\" to=\"50.717967697245484\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-30.00000000000063\" y1=\"50.717967697245484\" x2=\"-30.00000000000063\" y2=\"50.717967697245484\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_280\" attributename=\"x2\" attributetype=\"XML\" from=\"-30.00000000000063\" to=\"-70.00000000000072\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_279.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_279.end\" from=\"50.717967697245484\" to=\"120.00000000000051\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-70.00000000000072\" y1=\"120.00000000000051\" x2=\"-70.00000000000072\" y2=\"120.00000000000051\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_284\" attributename=\"x2\" attributetype=\"XML\" from=\"-70.00000000000072\" to=\"-70.00000000000061\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_283.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_283.end\" from=\"120.00000000000051\" to=\"200.0000000000005\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"-70.00000000000061\" y1=\"200.0000000000005\" x2=\"-70.00000000000061\" y2=\"200.0000000000005\" style=\"stroke: black;stroke-width: 2\" opacity=\"0\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_286\" attributename=\"x2\" attributetype=\"XML\" from=\"-70.00000000000061\" to=\"19.99999999999939\" dur=\" 0.129s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_285.end\"></animate></line><line x1=\"19.99999999999939\" y1=\"200.00000000000085\" x2=\"19.99999999999939\" y2=\"200.00000000000085\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_287\" attributename=\"x2\" attributetype=\"XML\" from=\"19.99999999999939\" to=\"99.99999999999939\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_286.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_286.end\" from=\"200.00000000000085\" to=\"200.00000000000117\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"99.99999999999939\" y1=\"200.00000000000117\" x2=\"99.99999999999939\" y2=\"200.00000000000117\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_289\" attributename=\"x2\" attributetype=\"XML\" from=\"99.99999999999939\" to=\"99.99999999999899\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_288.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_288.end\" from=\"200.00000000000117\" to=\"120.00000000000117\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"99.99999999999899\" y1=\"120.00000000000117\" x2=\"99.99999999999899\" y2=\"120.00000000000117\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_291\" attributename=\"x2\" attributetype=\"XML\" from=\"99.99999999999899\" to=\"19.99999999999899\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_290.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_290.end\" from=\"120.00000000000117\" to=\"120.00000000000112\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"19.99999999999899\" y1=\"120.00000000000112\" x2=\"19.99999999999899\" y2=\"120.00000000000112\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_293\" attributename=\"x2\" attributetype=\"XML\" from=\"19.99999999999899\" to=\"19.999999999998522\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_292.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_292.end\" from=\"120.00000000000112\" to=\"200.00000000000114\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"19.999999999998522\" y1=\"200.00000000000114\" x2=\"19.999999999998522\" y2=\"200.00000000000114\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_295\" attributename=\"x2\" attributetype=\"XML\" from=\"19.999999999998522\" to=\"39.99999999999852\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_294.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_294.end\" from=\"200.00000000000114\" to=\"200.00000000000108\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"39.99999999999852\" y1=\"200.00000000000108\" x2=\"39.99999999999852\" y2=\"200.00000000000108\" style=\"stroke: blue;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_299\" attributename=\"x2\" attributetype=\"XML\" from=\"39.99999999999852\" to=\"39.99999999999867\" dur=\" 0.086s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_298.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_298.end\" from=\"200.00000000000108\" to=\"140.00000000000108\" dur=\" 0.086s\" fill=\"freeze\"></animate></line><line x1=\"39.99999999999867\" y1=\"140.00000000000108\" x2=\"39.99999999999867\" y2=\"140.00000000000108\" style=\"stroke: blue;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_301\" attributename=\"x2\" attributetype=\"XML\" from=\"39.99999999999867\" to=\"79.99999999999866\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_300.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_300.end\" from=\"140.00000000000108\" to=\"140.00000000000097\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"79.99999999999866\" y1=\"140.00000000000097\" x2=\"79.99999999999866\" y2=\"140.00000000000097\" style=\"stroke: blue;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_303\" attributename=\"x2\" attributetype=\"XML\" from=\"79.99999999999866\" to=\"79.99999999999831\" dur=\" 0.086s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_302.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_302.end\" from=\"140.00000000000097\" to=\"200.00000000000097\" dur=\" 0.086s\" fill=\"freeze\"></animate></line><line x1=\"79.99999999999831\" y1=\"200.00000000000097\" x2=\"79.99999999999831\" y2=\"200.00000000000097\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_307\" attributename=\"x2\" attributetype=\"XML\" from=\"79.99999999999831\" to=\"99.99999999999831\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_306.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_306.end\" from=\"200.00000000000097\" to=\"200.0000000000009\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"99.99999999999831\" y1=\"200.0000000000009\" x2=\"99.99999999999831\" y2=\"200.0000000000009\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_309\" attributename=\"x2\" attributetype=\"XML\" from=\"99.99999999999831\" to=\"99.99999999999851\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_308.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_308.end\" from=\"200.0000000000009\" to=\"120.00000000000091\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"99.99999999999851\" y1=\"120.00000000000091\" x2=\"99.99999999999851\" y2=\"120.00000000000091\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_313\" attributename=\"x2\" attributetype=\"XML\" from=\"99.99999999999851\" to=\"59.99999999999847\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_312.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_312.end\" from=\"120.00000000000091\" to=\"50.71796769724584\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"59.99999999999847\" y1=\"50.71796769724584\" x2=\"59.99999999999847\" y2=\"50.71796769724584\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_315\" attributename=\"x2\" attributetype=\"XML\" from=\"59.99999999999847\" to=\"19.999999999998337\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_314.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_314.end\" from=\"50.71796769724584\" to=\"120.00000000000085\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"19.999999999998337\" y1=\"120.00000000000085\" x2=\"19.999999999998337\" y2=\"120.00000000000085\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_319\" attributename=\"x2\" attributetype=\"XML\" from=\"19.999999999998337\" to=\"19.999999999998415\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_318.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_318.end\" from=\"120.00000000000085\" to=\"200.00000000000085\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"19.999999999998415\" y1=\"200.00000000000085\" x2=\"19.999999999998415\" y2=\"200.00000000000085\" style=\"stroke: black;stroke-width: 2\" opacity=\"0\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_321\" attributename=\"x2\" attributetype=\"XML\" from=\"19.999999999998415\" to=\"109.99999999999841\" dur=\" 0.129s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_320.end\"></animate></line><line x1=\"109.99999999999841\" y1=\"200.00000000000125\" x2=\"109.99999999999841\" y2=\"200.00000000000125\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_322\" attributename=\"x2\" attributetype=\"XML\" from=\"109.99999999999841\" to=\"189.9999999999984\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_321.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_321.end\" from=\"200.00000000000125\" to=\"200.0000000000016\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"189.9999999999984\" y1=\"200.0000000000016\" x2=\"189.9999999999984\" y2=\"200.0000000000016\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_324\" attributename=\"x2\" attributetype=\"XML\" from=\"189.9999999999984\" to=\"189.99999999999807\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_323.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_323.end\" from=\"200.0000000000016\" to=\"120.00000000000159\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"189.99999999999807\" y1=\"120.00000000000159\" x2=\"189.99999999999807\" y2=\"120.00000000000159\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_326\" attributename=\"x2\" attributetype=\"XML\" from=\"189.99999999999807\" to=\"109.99999999999807\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_325.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_325.end\" from=\"120.00000000000159\" to=\"120.0000000000015\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"109.99999999999807\" y1=\"120.0000000000015\" x2=\"109.99999999999807\" y2=\"120.0000000000015\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_328\" attributename=\"x2\" attributetype=\"XML\" from=\"109.99999999999807\" to=\"109.99999999999756\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_327.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_327.end\" from=\"120.0000000000015\" to=\"200.0000000000015\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"109.99999999999756\" y1=\"200.0000000000015\" x2=\"109.99999999999756\" y2=\"200.0000000000015\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_330\" attributename=\"x2\" attributetype=\"XML\" from=\"109.99999999999756\" to=\"129.99999999999756\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_329.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_329.end\" from=\"200.0000000000015\" to=\"200.00000000000145\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"129.99999999999756\" y1=\"200.00000000000145\" x2=\"129.99999999999756\" y2=\"200.00000000000145\" style=\"stroke: blue;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_334\" attributename=\"x2\" attributetype=\"XML\" from=\"129.99999999999756\" to=\"129.99999999999773\" dur=\" 0.086s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_333.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_333.end\" from=\"200.00000000000145\" to=\"140.00000000000145\" dur=\" 0.086s\" fill=\"freeze\"></animate></line><line x1=\"129.99999999999773\" y1=\"140.00000000000145\" x2=\"129.99999999999773\" y2=\"140.00000000000145\" style=\"stroke: blue;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_336\" attributename=\"x2\" attributetype=\"XML\" from=\"129.99999999999773\" to=\"169.99999999999773\" dur=\" 0.057s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_335.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_335.end\" from=\"140.00000000000145\" to=\"140.00000000000136\" dur=\" 0.057s\" fill=\"freeze\"></animate></line><line x1=\"169.99999999999773\" y1=\"140.00000000000136\" x2=\"169.99999999999773\" y2=\"140.00000000000136\" style=\"stroke: blue;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_338\" attributename=\"x2\" attributetype=\"XML\" from=\"169.99999999999773\" to=\"169.99999999999736\" dur=\" 0.086s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_337.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_337.end\" from=\"140.00000000000136\" to=\"200.00000000000136\" dur=\" 0.086s\" fill=\"freeze\"></animate></line><line x1=\"169.99999999999736\" y1=\"200.00000000000136\" x2=\"169.99999999999736\" y2=\"200.00000000000136\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_342\" attributename=\"x2\" attributetype=\"XML\" from=\"169.99999999999736\" to=\"189.99999999999736\" dur=\" 0.029s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_341.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_341.end\" from=\"200.00000000000136\" to=\"200.0000000000013\" dur=\" 0.029s\" fill=\"freeze\"></animate></line><line x1=\"189.99999999999736\" y1=\"200.0000000000013\" x2=\"189.99999999999736\" y2=\"200.0000000000013\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_344\" attributename=\"x2\" attributetype=\"XML\" from=\"189.99999999999736\" to=\"189.99999999999758\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_343.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_343.end\" from=\"200.0000000000013\" to=\"120.00000000000131\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"189.99999999999758\" y1=\"120.00000000000131\" x2=\"189.99999999999758\" y2=\"120.00000000000131\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_348\" attributename=\"x2\" attributetype=\"XML\" from=\"189.99999999999758\" to=\"149.99999999999758\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_347.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_347.end\" from=\"120.00000000000131\" to=\"50.71796769724622\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"149.99999999999758\" y1=\"50.71796769724622\" x2=\"149.99999999999758\" y2=\"50.71796769724622\" style=\"stroke: green;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_350\" attributename=\"x2\" attributetype=\"XML\" from=\"149.99999999999758\" to=\"109.99999999999741\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_349.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_349.end\" from=\"50.71796769724622\" to=\"120.00000000000121\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"109.99999999999741\" y1=\"120.00000000000121\" x2=\"109.99999999999741\" y2=\"120.00000000000121\" style=\"stroke: black;stroke-width: 2\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_354\" attributename=\"x2\" attributetype=\"XML\" from=\"109.99999999999741\" to=\"109.99999999999746\" dur=\" 0.115s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_353.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_353.end\" from=\"120.00000000000121\" to=\"200.0000000000012\" dur=\" 0.115s\" fill=\"freeze\"></animate></line><line x1=\"109.99999999999746\" y1=\"200.0000000000012\" x2=\"109.99999999999746\" y2=\"200.0000000000012\" style=\"stroke: black;stroke-width: 2\" opacity=\"0\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_356\" attributename=\"x2\" attributetype=\"XML\" from=\"109.99999999999746\" to=\"199.99999999999744\" dur=\" 0.129s\" fill=\"freeze\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_355.end\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_1\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"-250,0\" dur=\" 0.358s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-250,0\" to=\"-170.0,-0.0\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_5.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_7\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-180.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_6.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-170.0,-0.0\" to=\"-170.0,-80.0\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_7.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_9\" type=\"rotate\" from=\"-180.0,0,0\" to=\"-270.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_8.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-170.0,-80.0\" to=\"-250.0,-80.00000000000001\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_9.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_11\" type=\"rotate\" from=\"-270.0,0,0\" to=\"-360.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_10.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-250.0,-80.00000000000001\" to=\"-250.00000000000003,-1.4210854715202004e-14\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_11.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_12.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_13\" type=\"rotate\" from=\"-360.0,0,0\" to=\"-450.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_12.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_13.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-250.00000000000003,-1.4210854715202004e-14\" to=\"-230.00000000000003,-9.312267518612591e-15\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_13.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_14.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_15\" type=\"rotate\" from=\"-450.0,0,0\" to=\"-540.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_14.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_16\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_15.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"red\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_17\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_16.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"red\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_17.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-230.00000000000003,-9.312267518612591e-15\" to=\"-230.00000000000003,-40.00000000000001\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_17.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_18.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_19\" type=\"rotate\" from=\"-540.0,0,0\" to=\"-450.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_18.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_19.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-230.00000000000003,-40.00000000000001\" to=\"-190.00000000000003,-40.0\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_19.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_20.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_21\" type=\"rotate\" from=\"-450.0,0,0\" to=\"-360.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_20.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_21.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-190.00000000000003,-40.0\" to=\"-190.00000000000003,-0.0\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_21.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_22.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_23\" type=\"rotate\" from=\"-360.0,0,0\" to=\"-450.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_22.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_24\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_23.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"red\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_25\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_24.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"red\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_25.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-190.00000000000003,-0.0\" to=\"-170.00000000000003,4.898587196589413e-15\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_25.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_26.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_27\" type=\"rotate\" from=\"-450.0,0,0\" to=\"-540.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_26.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_27.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-170.00000000000003,4.898587196589413e-15\" to=\"-170.0,-80.0\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_27.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_29\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_28.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_30\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_29.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_30.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_31\" type=\"rotate\" from=\"-540.0,0,0\" to=\"-570.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_30.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_31.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-170.0,-80.0\" to=\"-209.99999999999994,-149.2820323027551\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_31.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_32.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_33\" type=\"rotate\" from=\"-570.0,0,0\" to=\"-690.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_32.end\" dur=\" 0.037s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_33.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-209.99999999999994,-149.2820323027551\" to=\"-249.99999999999994,-80.00000000000001\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_33.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_35\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_34.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_36\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_35.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_36.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_37\" type=\"rotate\" from=\"-690.0,0,0\" to=\"-720.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_36.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_37.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-249.99999999999994,-80.00000000000001\" to=\"-249.99999999999997,-1.4210854715202004e-14\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_37.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_38.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_39\" type=\"rotate\" from=\"-720.0,0,0\" to=\"-810.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_38.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_39.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-249.99999999999997,-1.4210854715202004e-14\" to=\"-159.99999999999997,2.987643005410271e-14\" dur=\" 0.129s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_39.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_40.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-159.99999999999997,2.987643005410271e-14\" to=\"-79.99999999999997,6.906512762681802e-14\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_40.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_41.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_42\" type=\"rotate\" from=\"-810.0,0,0\" to=\"-900.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_41.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_42.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-79.99999999999997,6.906512762681802e-14\" to=\"-79.99999999999993,-79.99999999999993\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_42.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_43.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_44\" type=\"rotate\" from=\"-900.0,0,0\" to=\"-990.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_43.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_44.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-79.99999999999993,-79.99999999999993\" to=\"-159.99999999999994,-79.99999999999997\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_44.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_45.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_46\" type=\"rotate\" from=\"-990.0,0,0\" to=\"-1080.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_45.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_46.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-159.99999999999994,-79.99999999999997\" to=\"-159.99999999999986,2.842170943040401e-14\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_46.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_47.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_48\" type=\"rotate\" from=\"-1080.0,0,0\" to=\"-1170.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_47.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_48.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-159.99999999999986,2.842170943040401e-14\" to=\"-139.99999999999986,4.3117471020172244e-14\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_48.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_49.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_50\" type=\"rotate\" from=\"-1170.0,0,0\" to=\"-1260.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_49.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_51\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_50.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"red\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_52\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_51.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"red\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_52.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-139.99999999999986,4.3117471020172244e-14\" to=\"-139.9999999999999,-39.99999999999996\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_52.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_53.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_54\" type=\"rotate\" from=\"-1260.0,0,0\" to=\"-1170.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_53.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_54.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-139.9999999999999,-39.99999999999996\" to=\"-99.99999999999989,-39.99999999999993\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_54.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_55.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_56\" type=\"rotate\" from=\"-1170.0,0,0\" to=\"-1080.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_55.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_56.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-99.99999999999989,-39.99999999999993\" to=\"-99.99999999999984,7.105427357601002e-14\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_56.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_57.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_58\" type=\"rotate\" from=\"-1080.0,0,0\" to=\"-1170.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_57.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_59\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_58.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"red\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_60\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_59.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"red\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_60.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-99.99999999999984,7.105427357601002e-14\" to=\"-79.99999999999984,8.575003516577826e-14\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_60.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_61.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_62\" type=\"rotate\" from=\"-1170.0,0,0\" to=\"-1260.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_61.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_62.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-79.99999999999984,8.575003516577826e-14\" to=\"-79.99999999999993,-79.99999999999991\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_62.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_64\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_63.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_65\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_64.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_65.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_66\" type=\"rotate\" from=\"-1260.0,0,0\" to=\"-1290.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_65.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_66.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-79.99999999999993,-79.99999999999991\" to=\"-119.99999999999996,-149.282032302755\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_66.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_67.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_68\" type=\"rotate\" from=\"-1290.0,0,0\" to=\"-1410.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_67.end\" dur=\" 0.037s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_68.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-119.99999999999996,-149.282032302755\" to=\"-160.0000000000001,-79.99999999999999\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_68.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_70\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_69.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_71\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_70.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_71.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_72\" type=\"rotate\" from=\"-1410.0,0,0\" to=\"-1440.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_71.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_72.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-160.0000000000001,-79.99999999999999\" to=\"-160.00000000000006,1.4210854715202004e-14\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_72.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_73.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_74\" type=\"rotate\" from=\"-1440.0,0,0\" to=\"-1530.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_73.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_74.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-160.00000000000006,1.4210854715202004e-14\" to=\"-70.00000000000006,1.0238542425381144e-13\" dur=\" 0.129s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_74.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_75.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-70.00000000000006,1.0238542425381144e-13\" to=\"9.999999999999943,1.8076281939924206e-13\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_75.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_76.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_77\" type=\"rotate\" from=\"-1530.0,0,0\" to=\"-1620.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_76.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_77.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"9.999999999999943,1.8076281939924206e-13\" to=\"9.999999999999885,-79.99999999999982\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_77.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_78.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_79\" type=\"rotate\" from=\"-1620.0,0,0\" to=\"-1710.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_78.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_79.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"9.999999999999885,-79.99999999999982\" to=\"-70.00000000000011,-79.9999999999999\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_79.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_80.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_81\" type=\"rotate\" from=\"-1710.0,0,0\" to=\"-1800.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_80.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_81.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-70.00000000000011,-79.9999999999999\" to=\"-70.00000000000007,9.947598300641403e-14\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_81.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_82.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_83\" type=\"rotate\" from=\"-1800.0,0,0\" to=\"-1890.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_82.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_83.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-70.00000000000007,9.947598300641403e-14\" to=\"-50.00000000000007,1.2396891898936108e-13\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_83.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_84.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_85\" type=\"rotate\" from=\"-1890.0,0,0\" to=\"-1980.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_84.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_86\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_85.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"red\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_87\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_86.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"red\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_87.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-50.00000000000007,1.2396891898936108e-13\" to=\"-50.00000000000009,-39.99999999999988\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_87.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_88.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_89\" type=\"rotate\" from=\"-1980.0,0,0\" to=\"-1890.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_88.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_89.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-50.00000000000009,-39.99999999999988\" to=\"-10.000000000000092,-39.99999999999983\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_89.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_90.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_91\" type=\"rotate\" from=\"-1890.0,0,0\" to=\"-1800.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_90.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_91.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-10.000000000000092,-39.99999999999983\" to=\"-10.000000000000068,1.7053025658242404e-13\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_91.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_92.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_93\" type=\"rotate\" from=\"-1800.0,0,0\" to=\"-1890.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_92.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_94\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_93.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"red\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_95\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_94.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"red\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_95.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-10.000000000000068,1.7053025658242404e-13\" to=\"9.999999999999932,1.950231925653711e-13\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_95.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_96.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_97\" type=\"rotate\" from=\"-1890.0,0,0\" to=\"-1980.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_96.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_97.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"9.999999999999932,1.950231925653711e-13\" to=\"9.999999999999893,-79.9999999999998\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_97.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_99\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_98.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_100\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_99.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_100.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_101\" type=\"rotate\" from=\"-1980.0,0,0\" to=\"-2010.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_100.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_101.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"9.999999999999893,-79.9999999999998\" to=\"-29.99999999999985,-149.28203230275506\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_101.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_102.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_103\" type=\"rotate\" from=\"-2010.0,0,0\" to=\"-2130.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_102.end\" dur=\" 0.037s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_103.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-29.99999999999985,-149.28203230275506\" to=\"-69.99999999999979,-79.99999999999993\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_103.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_105\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_104.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_106\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_105.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_106.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_107\" type=\"rotate\" from=\"-2130.0,0,0\" to=\"-2160.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_106.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_107.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-69.99999999999979,-79.99999999999993\" to=\"-70.00000000000004,7.105427357601002e-14\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_107.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_108.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_109\" type=\"rotate\" from=\"-2160.0,0,0\" to=\"-2250.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_108.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_109.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-70.00000000000004,7.105427357601002e-14\" to=\"19.999999999999957,2.0331612788392416e-13\" dur=\" 0.129s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_109.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_110.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"19.999999999999957,2.0331612788392416e-13\" to=\"99.99999999999996,3.2088222060207e-13\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_110.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_111.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_112\" type=\"rotate\" from=\"-2250.0,0,0\" to=\"-2340.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_111.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_112.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"99.99999999999996,3.2088222060207e-13\" to=\"99.99999999999994,-79.99999999999967\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_112.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_113.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_114\" type=\"rotate\" from=\"-2340.0,0,0\" to=\"-2430.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_113.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_114.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"99.99999999999994,-79.99999999999967\" to=\"19.999999999999943,-79.99999999999952\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_114.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_115.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_116\" type=\"rotate\" from=\"-2430.0,0,0\" to=\"-2520.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_115.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_116.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"19.999999999999943,-79.99999999999952\" to=\"19.99999999999967,4.831690603168681e-13\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_116.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_117.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_118\" type=\"rotate\" from=\"-2520.0,0,0\" to=\"-2610.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_117.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_118.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"19.99999999999967,4.831690603168681e-13\" to=\"39.99999999999967,5.17459170692994e-13\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_118.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_119.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_120\" type=\"rotate\" from=\"-2610.0,0,0\" to=\"-2700.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_119.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_121\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_120.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"red\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_122\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_121.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"red\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_122.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"39.99999999999967,5.17459170692994e-13\" to=\"39.99999999999967,-39.99999999999948\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_122.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_123.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_124\" type=\"rotate\" from=\"-2700.0,0,0\" to=\"-2610.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_123.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_124.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"39.99999999999967,-39.99999999999948\" to=\"79.99999999999967,-39.99999999999941\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_124.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_125.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_126\" type=\"rotate\" from=\"-2610.0,0,0\" to=\"-2520.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_125.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_126.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"79.99999999999967,-39.99999999999941\" to=\"79.99999999999953,5.897504706808832e-13\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_126.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_127.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_128\" type=\"rotate\" from=\"-2520.0,0,0\" to=\"-2610.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_127.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_129\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_128.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"red\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_130\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_129.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"red\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_130.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"79.99999999999953,5.897504706808832e-13\" to=\"99.99999999999953,6.24040581057009e-13\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_130.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_131.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_132\" type=\"rotate\" from=\"-2610.0,0,0\" to=\"-2700.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_131.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_132.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"99.99999999999953,6.24040581057009e-13\" to=\"99.99999999999953,-79.99999999999937\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_132.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_134\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_133.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_135\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_134.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_135.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_136\" type=\"rotate\" from=\"-2700.0,0,0\" to=\"-2730.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_135.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_136.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"99.99999999999953,-79.99999999999937\" to=\"59.99999999999982,-149.28203230275463\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_136.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_137.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_138\" type=\"rotate\" from=\"-2730.0,0,0\" to=\"-2850.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_137.end\" dur=\" 0.037s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_138.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"59.99999999999982,-149.28203230275463\" to=\"19.999999999999858,-79.99999999999952\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_138.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_140\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_139.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_141\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_140.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_141.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_142\" type=\"rotate\" from=\"-2850.0,0,0\" to=\"-2880.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_141.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_142.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"19.999999999999858,-79.99999999999952\" to=\"19.999999999999563,4.831690603168681e-13\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_142.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_143.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_144\" type=\"rotate\" from=\"-2880.0,0,0\" to=\"-2970.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_143.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_144.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"19.999999999999563,4.831690603168681e-13\" to=\"109.99999999999956,6.595181993940869e-13\" dur=\" 0.129s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_144.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_145.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"109.99999999999956,6.595181993940869e-13\" to=\"189.99999999999955,8.162729896849481e-13\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_145.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_146.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_147\" type=\"rotate\" from=\"-2970.0,0,0\" to=\"-3060.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_146.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_147.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"189.99999999999955,8.162729896849481e-13\" to=\"189.99999999999957,-79.99999999999919\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_147.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_148.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_149\" type=\"rotate\" from=\"-3060.0,0,0\" to=\"-3150.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_148.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_149.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"189.99999999999957,-79.99999999999919\" to=\"109.99999999999957,-79.99999999999908\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_149.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_150.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_151\" type=\"rotate\" from=\"-3150.0,0,0\" to=\"-3240.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_150.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_151.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"109.99999999999957,-79.99999999999908\" to=\"109.99999999999926,9.237055564881302e-13\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_151.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_152.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_153\" type=\"rotate\" from=\"-3240.0,0,0\" to=\"-3330.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_152.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_153.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"109.99999999999926,9.237055564881302e-13\" to=\"129.99999999999926,9.677928412574349e-13\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_153.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_154.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_155\" type=\"rotate\" from=\"-3330.0,0,0\" to=\"-3420.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_154.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_156\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_155.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"red\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_157\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_156.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"red\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_157.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"129.99999999999926,9.677928412574349e-13\" to=\"129.9999999999993,-39.999999999999034\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_157.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_158.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_159\" type=\"rotate\" from=\"-3420.0,0,0\" to=\"-3330.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_158.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_159.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"129.9999999999993,-39.999999999999034\" to=\"169.9999999999993,-39.99999999999895\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_159.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_160.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_161\" type=\"rotate\" from=\"-3330.0,0,0\" to=\"-3240.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_160.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_161.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"169.9999999999993,-39.99999999999895\" to=\"169.99999999999912,1.0516032489249483e-12\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_161.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_162.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_163\" type=\"rotate\" from=\"-3240.0,0,0\" to=\"-3330.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_162.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_164\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_163.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"red\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_165\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_164.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"red\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_165.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"169.99999999999912,1.0516032489249483e-12\" to=\"189.99999999999912,1.095690533694253e-12\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_165.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_166.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_167\" type=\"rotate\" from=\"-3330.0,0,0\" to=\"-3420.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_166.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_167.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"189.99999999999912,1.095690533694253e-12\" to=\"189.99999999999915,-79.9999999999989\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_167.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_169\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_168.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_170\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_169.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_170.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_171\" type=\"rotate\" from=\"-3420.0,0,0\" to=\"-3450.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_170.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_171.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"189.99999999999915,-79.9999999999989\" to=\"149.99999999999898,-149.2820323027539\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_171.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_172.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_173\" type=\"rotate\" from=\"-3450.0,0,0\" to=\"-3570.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_172.end\" dur=\" 0.037s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_173.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"149.99999999999898,-149.2820323027539\" to=\"109.99999999999898,-79.9999999999988\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_173.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_175\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_174.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_176\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_175.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_176.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_177\" type=\"rotate\" from=\"-3570.0,0,0\" to=\"-3600.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_176.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_177.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"109.99999999999898,-79.9999999999988\" to=\"109.99999999999865,1.1937117960769683e-12\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_177.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_178.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_179\" type=\"rotate\" from=\"-3600.0,0,0\" to=\"-3690.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_178.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_179.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"109.99999999999865,1.1937117960769683e-12\" to=\"199.99999999999864,1.414148219923492e-12\" dur=\" 0.129s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_179.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_180.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"199.99999999999864,1.414148219923492e-12\" to=\"-250,200\" dur=\" 0.931s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_180.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_181.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-250,200\" to=\"-170.0,200.0000000000002\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_181.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_182.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_183\" type=\"rotate\" from=\"-3690.0,0,0\" to=\"-3780.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_182.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_183.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-170.0,200.0000000000002\" to=\"-169.99999999999937,120.0000000000002\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_183.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_184.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_185\" type=\"rotate\" from=\"-3780.0,0,0\" to=\"-3870.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_184.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_185.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-169.99999999999937,120.0000000000002\" to=\"-249.99999999999937,120.00000000000028\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_185.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_186.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_187\" type=\"rotate\" from=\"-3870.0,0,0\" to=\"-3960.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_186.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_187.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-249.99999999999937,120.00000000000028\" to=\"-249.99999999999972,200.00000000000028\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_187.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_188.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_189\" type=\"rotate\" from=\"-3960.0,0,0\" to=\"-4050.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_188.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_189.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-249.99999999999972,200.00000000000028\" to=\"-229.99999999999972,200.0000000000002\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_189.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_190.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_191\" type=\"rotate\" from=\"-4050.0,0,0\" to=\"-4140.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_190.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_192\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_191.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"blue\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_193\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_192.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"blue\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_193.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-229.99999999999972,200.0000000000002\" to=\"-229.99999999999966,140.0000000000002\" dur=\" 0.086s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_193.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_194.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_195\" type=\"rotate\" from=\"-4140.0,0,0\" to=\"-4050.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_194.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_195.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-229.99999999999966,140.0000000000002\" to=\"-189.99999999999966,140.00000000000003\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_195.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_196.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_197\" type=\"rotate\" from=\"-4050.0,0,0\" to=\"-3960.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_196.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_197.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-189.99999999999966,140.00000000000003\" to=\"-189.99999999999991,200.00000000000003\" dur=\" 0.086s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_197.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_198.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_199\" type=\"rotate\" from=\"-3960.0,0,0\" to=\"-4050.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_198.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_200\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_199.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"blue\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_201\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_200.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"blue\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_201.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-189.99999999999991,200.00000000000003\" to=\"-169.99999999999991,199.99999999999994\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_201.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_202.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_203\" type=\"rotate\" from=\"-4050.0,0,0\" to=\"-4140.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_202.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_203.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-169.99999999999991,199.99999999999994\" to=\"-169.99999999999983,119.99999999999994\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_203.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_205\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_204.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_206\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_205.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_206.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_207\" type=\"rotate\" from=\"-4140.0,0,0\" to=\"-4170.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_206.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_207.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-169.99999999999983,119.99999999999994\" to=\"-209.99999999999997,50.71796769724493\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_207.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_208.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_209\" type=\"rotate\" from=\"-4170.0,0,0\" to=\"-4290.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_208.end\" dur=\" 0.037s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_209.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-209.99999999999997,50.71796769724493\" to=\"-250.0,120.0\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_209.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_211\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_210.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_212\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_211.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_212.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_213\" type=\"rotate\" from=\"-4290.0,0,0\" to=\"-4320.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_212.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_213.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-250.0,120.0\" to=\"-249.9999999999998,200.0\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_213.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_214.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_215\" type=\"rotate\" from=\"-4320.0,0,0\" to=\"-4410.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_214.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_215.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-249.9999999999998,200.0\" to=\"-159.9999999999998,200.00000000000026\" dur=\" 0.129s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_215.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_216.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-159.9999999999998,200.00000000000026\" to=\"-79.9999999999998,200.00000000000048\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_216.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_217.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_218\" type=\"rotate\" from=\"-4410.0,0,0\" to=\"-4500.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_217.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_218.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-79.9999999999998,200.00000000000048\" to=\"-79.99999999999913,120.00000000000048\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_218.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_219.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_220\" type=\"rotate\" from=\"-4500.0,0,0\" to=\"-4590.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_219.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_220.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-79.99999999999913,120.00000000000048\" to=\"-159.99999999999915,120.00000000000053\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_220.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_221.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_222\" type=\"rotate\" from=\"-4590.0,0,0\" to=\"-4680.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_221.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_222.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-159.99999999999915,120.00000000000053\" to=\"-159.99999999999955,200.0000000000005\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_222.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_223.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_224\" type=\"rotate\" from=\"-4680.0,0,0\" to=\"-4770.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_223.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_224.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-159.99999999999955,200.0000000000005\" to=\"-139.99999999999955,200.00000000000043\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_224.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_225.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_226\" type=\"rotate\" from=\"-4770.0,0,0\" to=\"-4860.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_225.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_227\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_226.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"blue\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_228\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_227.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"blue\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_228.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-139.99999999999955,200.00000000000043\" to=\"-139.99999999999946,140.00000000000043\" dur=\" 0.086s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_228.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_229.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_230\" type=\"rotate\" from=\"-4860.0,0,0\" to=\"-4770.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_229.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_230.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-139.99999999999946,140.00000000000043\" to=\"-99.99999999999946,140.00000000000026\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_230.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_231.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_232\" type=\"rotate\" from=\"-4770.0,0,0\" to=\"-4680.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_231.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_232.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-99.99999999999946,140.00000000000026\" to=\"-99.99999999999976,200.00000000000026\" dur=\" 0.086s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_232.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_233.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_234\" type=\"rotate\" from=\"-4680.0,0,0\" to=\"-4770.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_233.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_235\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_234.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"blue\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_236\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_235.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"blue\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_236.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-99.99999999999976,200.00000000000026\" to=\"-79.99999999999976,200.00000000000017\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_236.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_237.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_238\" type=\"rotate\" from=\"-4770.0,0,0\" to=\"-4860.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_237.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_238.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-79.99999999999976,200.00000000000017\" to=\"-79.99999999999964,120.00000000000017\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_238.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_240\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_239.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_241\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_240.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_241.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_242\" type=\"rotate\" from=\"-4860.0,0,0\" to=\"-4890.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_241.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_242.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-79.99999999999964,120.00000000000017\" to=\"-119.99999999999974,50.71796769724514\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_242.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_243.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_244\" type=\"rotate\" from=\"-4890.0,0,0\" to=\"-5010.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_243.end\" dur=\" 0.037s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_244.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-119.99999999999974,50.71796769724514\" to=\"-159.99999999999983,120.0000000000002\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_244.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_246\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_245.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_247\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_246.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_247.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_248\" type=\"rotate\" from=\"-5010.0,0,0\" to=\"-5040.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_247.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_248.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-159.99999999999983,120.0000000000002\" to=\"-159.99999999999966,200.0000000000002\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_248.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_249.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_250\" type=\"rotate\" from=\"-5040.0,0,0\" to=\"-5130.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_249.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_250.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-159.99999999999966,200.0000000000002\" to=\"-69.99999999999966,200.0000000000005\" dur=\" 0.129s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_250.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_251.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-69.99999999999966,200.0000000000005\" to=\"10.000000000000341,200.0000000000008\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_251.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_252.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_253\" type=\"rotate\" from=\"-5130.0,0,0\" to=\"-5220.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_252.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_253.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"10.000000000000341,200.0000000000008\" to=\"9.99999999999991,120.0000000000008\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_253.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_254.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_255\" type=\"rotate\" from=\"-5220.0,0,0\" to=\"-5310.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_254.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_255.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"9.99999999999991,120.0000000000008\" to=\"-70.00000000000009,120.0000000000008\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_255.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_256.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_257\" type=\"rotate\" from=\"-5310.0,0,0\" to=\"-5400.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_256.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_257.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-70.00000000000009,120.0000000000008\" to=\"-70.00000000000051,200.0000000000008\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_257.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_258.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_259\" type=\"rotate\" from=\"-5400.0,0,0\" to=\"-5490.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_258.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_259.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-70.00000000000051,200.0000000000008\" to=\"-50.00000000000051,200.00000000000074\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_259.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_260.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_261\" type=\"rotate\" from=\"-5490.0,0,0\" to=\"-5580.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_260.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_262\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_261.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"blue\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_263\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_262.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"blue\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_263.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-50.00000000000051,200.00000000000074\" to=\"-50.00000000000039,140.00000000000074\" dur=\" 0.086s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_263.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_264.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_265\" type=\"rotate\" from=\"-5580.0,0,0\" to=\"-5490.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_264.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_265.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-50.00000000000039,140.00000000000074\" to=\"-10.00000000000039,140.0000000000006\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_265.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_266.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_267\" type=\"rotate\" from=\"-5490.0,0,0\" to=\"-5400.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_266.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_267.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-10.00000000000039,140.0000000000006\" to=\"-10.000000000000714,200.0000000000006\" dur=\" 0.086s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_267.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_268.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_269\" type=\"rotate\" from=\"-5400.0,0,0\" to=\"-5490.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_268.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_270\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_269.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"blue\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_271\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_270.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"blue\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_271.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-10.000000000000714,200.0000000000006\" to=\"9.999999999999286,200.00000000000054\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_271.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_272.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_273\" type=\"rotate\" from=\"-5490.0,0,0\" to=\"-5580.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_272.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_273.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"9.999999999999286,200.00000000000054\" to=\"9.999999999999442,120.00000000000054\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_273.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_275\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_274.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_276\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_275.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_276.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_277\" type=\"rotate\" from=\"-5580.0,0,0\" to=\"-5610.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_276.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_277.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"9.999999999999442,120.00000000000054\" to=\"-30.00000000000063,50.717967697245484\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_277.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_278.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_279\" type=\"rotate\" from=\"-5610.0,0,0\" to=\"-5730.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_278.end\" dur=\" 0.037s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_279.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-30.00000000000063,50.717967697245484\" to=\"-70.00000000000072,120.00000000000051\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_279.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_281\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_280.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_282\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_281.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_282.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_283\" type=\"rotate\" from=\"-5730.0,0,0\" to=\"-5760.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_282.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_283.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-70.00000000000072,120.00000000000051\" to=\"-70.00000000000061,200.0000000000005\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_283.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_284.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_285\" type=\"rotate\" from=\"-5760.0,0,0\" to=\"-5850.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_284.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_285.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-70.00000000000061,200.0000000000005\" to=\"19.99999999999939,200.00000000000085\" dur=\" 0.129s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_285.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_286.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"19.99999999999939,200.00000000000085\" to=\"99.99999999999939,200.00000000000117\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_286.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_287.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_288\" type=\"rotate\" from=\"-5850.0,0,0\" to=\"-5940.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_287.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_288.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"99.99999999999939,200.00000000000117\" to=\"99.99999999999899,120.00000000000117\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_288.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_289.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_290\" type=\"rotate\" from=\"-5940.0,0,0\" to=\"-6030.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_289.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_290.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"99.99999999999899,120.00000000000117\" to=\"19.99999999999899,120.00000000000112\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_290.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_291.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_292\" type=\"rotate\" from=\"-6030.0,0,0\" to=\"-6120.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_291.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_292.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"19.99999999999899,120.00000000000112\" to=\"19.999999999998522,200.00000000000114\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_292.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_293.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_294\" type=\"rotate\" from=\"-6120.0,0,0\" to=\"-6210.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_293.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_294.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"19.999999999998522,200.00000000000114\" to=\"39.99999999999852,200.00000000000108\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_294.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_295.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_296\" type=\"rotate\" from=\"-6210.0,0,0\" to=\"-6300.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_295.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_297\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_296.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"blue\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_298\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_297.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"blue\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_298.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"39.99999999999852,200.00000000000108\" to=\"39.99999999999867,140.00000000000108\" dur=\" 0.086s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_298.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_299.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_300\" type=\"rotate\" from=\"-6300.0,0,0\" to=\"-6210.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_299.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_300.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"39.99999999999867,140.00000000000108\" to=\"79.99999999999866,140.00000000000097\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_300.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_301.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_302\" type=\"rotate\" from=\"-6210.0,0,0\" to=\"-6120.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_301.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_302.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"79.99999999999866,140.00000000000097\" to=\"79.99999999999831,200.00000000000097\" dur=\" 0.086s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_302.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_303.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_304\" type=\"rotate\" from=\"-6120.0,0,0\" to=\"-6210.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_303.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_305\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_304.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"blue\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_306\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_305.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"blue\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_306.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"79.99999999999831,200.00000000000097\" to=\"99.99999999999831,200.0000000000009\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_306.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_307.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_308\" type=\"rotate\" from=\"-6210.0,0,0\" to=\"-6300.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_307.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_308.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"99.99999999999831,200.0000000000009\" to=\"99.99999999999851,120.00000000000091\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_308.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_310\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_309.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_311\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_310.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_311.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_312\" type=\"rotate\" from=\"-6300.0,0,0\" to=\"-6330.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_311.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_312.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"99.99999999999851,120.00000000000091\" to=\"59.99999999999847,50.71796769724584\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_312.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_313.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_314\" type=\"rotate\" from=\"-6330.0,0,0\" to=\"-6450.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_313.end\" dur=\" 0.037s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_314.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"59.99999999999847,50.71796769724584\" to=\"19.999999999998337,120.00000000000085\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_314.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_316\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_315.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_317\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_316.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_317.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_318\" type=\"rotate\" from=\"-6450.0,0,0\" to=\"-6480.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_317.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_318.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"19.999999999998337,120.00000000000085\" to=\"19.999999999998415,200.00000000000085\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_318.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_319.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_320\" type=\"rotate\" from=\"-6480.0,0,0\" to=\"-6570.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_319.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_320.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"19.999999999998415,200.00000000000085\" to=\"109.99999999999841,200.00000000000125\" dur=\" 0.129s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_320.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_321.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"109.99999999999841,200.00000000000125\" to=\"189.9999999999984,200.0000000000016\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_321.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_322.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_323\" type=\"rotate\" from=\"-6570.0,0,0\" to=\"-6660.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_322.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_323.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"189.9999999999984,200.0000000000016\" to=\"189.99999999999807,120.00000000000159\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_323.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_324.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_325\" type=\"rotate\" from=\"-6660.0,0,0\" to=\"-6750.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_324.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_325.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"189.99999999999807,120.00000000000159\" to=\"109.99999999999807,120.0000000000015\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_325.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_326.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_327\" type=\"rotate\" from=\"-6750.0,0,0\" to=\"-6840.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_326.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_327.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"109.99999999999807,120.0000000000015\" to=\"109.99999999999756,200.0000000000015\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_327.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_328.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_329\" type=\"rotate\" from=\"-6840.0,0,0\" to=\"-6930.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_328.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_329.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"109.99999999999756,200.0000000000015\" to=\"129.99999999999756,200.00000000000145\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_329.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_330.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_331\" type=\"rotate\" from=\"-6930.0,0,0\" to=\"-7020.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_330.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_332\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_331.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"blue\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_333\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_332.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"blue\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_333.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"129.99999999999756,200.00000000000145\" to=\"129.99999999999773,140.00000000000145\" dur=\" 0.086s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_333.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_334.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_335\" type=\"rotate\" from=\"-7020.0,0,0\" to=\"-6930.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_334.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_335.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"129.99999999999773,140.00000000000145\" to=\"169.99999999999773,140.00000000000136\" dur=\" 0.057s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_335.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_336.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_337\" type=\"rotate\" from=\"-6930.0,0,0\" to=\"-6840.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_336.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_337.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"169.99999999999773,140.00000000000136\" to=\"169.99999999999736,200.00000000000136\" dur=\" 0.086s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_337.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_338.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_339\" type=\"rotate\" from=\"-6840.0,0,0\" to=\"-6930.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_338.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_340\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_339.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"blue\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_341\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_340.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"blue\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_341.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"169.99999999999736,200.00000000000136\" to=\"189.99999999999736,200.0000000000013\" dur=\" 0.029s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_341.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_342.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_343\" type=\"rotate\" from=\"-6930.0,0,0\" to=\"-7020.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_342.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_343.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"189.99999999999736,200.0000000000013\" to=\"189.99999999999758,120.00000000000131\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_343.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_345\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_344.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_346\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_345.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"green\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_346.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_347\" type=\"rotate\" from=\"-7020.0,0,0\" to=\"-7050.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_346.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_347.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"189.99999999999758,120.00000000000131\" to=\"149.99999999999758,50.71796769724622\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_347.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_348.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_349\" type=\"rotate\" from=\"-7050.0,0,0\" to=\"-7170.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_348.end\" dur=\" 0.037s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_349.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"149.99999999999758,50.71796769724622\" to=\"109.99999999999741,120.00000000000121\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_349.end\" fill=\"freeze\"></animateMotion><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_351\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_350.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animate id=\"af_aac6903e37044acabb742bfaf6af6eb5_352\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_351.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"green\" to=\"black\"></animate><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_352.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_353\" type=\"rotate\" from=\"-7170.0,0,0\" to=\"-7200.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_352.end\" dur=\" 0.009s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_353.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"109.99999999999741,120.00000000000121\" to=\"109.99999999999746,200.0000000000012\" dur=\" 0.115s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_353.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_354.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_aac6903e37044acabb742bfaf6af6eb5_355\" type=\"rotate\" from=\"-7200.0,0,0\" to=\"-7290.0,0,0\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_354.end\" dur=\" 0.028s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_aac6903e37044acabb742bfaf6af6eb5_355.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"109.99999999999746,200.0000000000012\" to=\"199.99999999999744,200.00000000000165\" dur=\" 0.129s\" begin=\"af_aac6903e37044acabb742bfaf6af6eb5_355.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\n\ndef maison(h, c):\n #deddin de la base\n for _ in range(4):\n forward(80)\n left(90)\n forward(20)\n left(90)\n \n # desin de la porte\n color(c)\n forward(h)\n right(90)\n forward(40)\n right(90)\n forward(h)\n left(90)\n \n color(\"black\")\n forward(20)\n left(90)\n forward(80)\n \n # toit\n color(\"green\")\n left(30)\n forward(80)\n left(120)\n forward(80)\n \n color(\"black\")\n left(30)\n forward(80)\n left(90)\n\n \nspeed(9) # pour dessiner vite\nwidth(2)\n\n# se mettre à gauche du dessin\npenup()\ngoto(-250,0)\npendown()\n# dessiner les maisons porte rouge \nfor _ in range(5):\n maison(40, \"red\")\n penup()\n forward(90)\n pendown()\n\n# se mettre à gauche en bas du dessin\npenup()\ngoto(-250,-200)\npendown()\n# dessiner les maisons porte rouge \nfor _ in range(5):\n maison(60, \"blue\")\n penup()\n forward(90)\n pendown()\n \ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "# Complément sur les valeurs par défaut *\n\nQuand une fonction possède beaucoup d'arguments, nous pouvons spécifier des valeurs par défaut. Pour ceci nous ajoutons la valeur par défaut dans la liste de paramètres avec le symbole `=`.\n\nLa fonction `rectangle(p, d, e, w=1, pen='black', fill='white')` dessine un rectangle aux dimensions `d` x `e` à la position `p`.\nCette fonction possède 3 paramètres optionnels (valeur par défaut en parenthèse):\n\n- `w` -- épaisseur de ligne (`1`)\n- `pen` -- couleur de ligne (`'black'`)\n- `fill` -- couleur de remplissage (`'white'`)\n\nIl a maintenant différentes façons à appeler la fonction. Tous les paramètres qui ont une valeur par défaut sont optionnels. Au minimum nous devons spécifier les paramètres sans valeur par défaut.\n\n```\nrectangle((40, 0), 80, 40)\n```\n\nLe rectangle est dessiné dans la direction actuelle de la tortue. Cette orientation peut être changée avec `seth()`. La tortue se positionne de l'autre côté du point de départ. Ceci permet d'enchainer à dessiner des rectangles.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\npenup()\n\ndef rectangle(p, d, e, w=1, pen='black', fill='white'):\n goto(p)\n pendown()\n width(w)\n pencolor(pen)\n fillcolor(fill)\n begin_fill()\n for i in range(2):\n forward(d)\n left(90)\n forward(e)\n left(90)\n end_fill()\n penup()\n\nrectangle([-200, 30], 40, 30)\nrectangle([-100, -20], 40, 30, 1, 'orange', 'orange')\nrectangle([100, -40], 30, 80, fill='yellow')\nrectangle([200, 100], 80, 40, 1, 'red', 'pink')\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\npenup()\n\ndef rectangle(p, d, e, w=1, pen='black', fill='white'):\n goto(p)\n pendown()\n width(w)\n pencolor(pen)\n fillcolor(fill)\n begin_fill()\n for i in range(2):\n forward(d)\n left(90)\n forward(e)\n left(90)\n end_fill()\n penup()\n\nrectangle([-200, 30], 40, 30)\nrectangle([-100, -20], 40, 30, 1, 'orange', 'orange')\nrectangle([100, -40], 30, 80, fill='yellow')\nrectangle([200, 100], 80, 40, 1, 'red', 'pink')\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Polygone régulier\n\nLa fonction `polygone()` dessine un polygone régulier avec n sommets. Les arguments de la fonction sont :\n\n- `d` -- distance du segment\n- `n` -- nombre de segments\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\ndef polygon(d, n, w=1, pen='black', fill='white'):\n down()\n pencolor(pen)\n width(w)\n fillcolor(fill)\n begin_fill()\n for i in range(n):\n forward(d)\n left(360/n)\n end_fill()\n up()\n\nup()\nbackward(280)\nfor n in range(3, 9):\n polygon(40, n, fill='lime')\n color('black')\n forward(100)\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef polygon(d, n, w=1, pen='black', fill='white'):\n down()\n pencolor(pen)\n width(w)\n fillcolor(fill)\n begin_fill()\n for i in range(n):\n forward(d)\n left(360/n)\n end_fill()\n up()\n\nup()\nbackward(280)\nfor n in range(3, 9):\n polygon(40, n, fill='lime')\n color('black')\n forward(100)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "## Polygone étoilé\n\nEn ajoutant un paramètre supplémentaire `m`, la fonction `polygone()` permet également de dessiner un polygone étoilé. Ce paramètre signifie le nombre de pics sauté pour aller au prochain des `n` points répartis dans un cercle. Pour `m=1` un polygone régulier est dessiné.\n\nes arguments de la fonction sont :\n\n- `d` -- distance du segment\n- `n` -- nombre de segments\n- `m` -- paramètre pour polygone étoilé (nombre de pics sautés)\n\n" }, { + "cell_type": "code", + "execution_count": 1, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef polygon(d, n, m=1, w=1, pen='black', fill='white'):\n down()\n pencolor(pen)\n width(w)\n fillcolor(fill)\n begin_fill()\n for i in range(n):\n forward(d)\n left(m*360/n)\n end_fill()\n up()\n\nup()\nspeed(0)\nbackward(250)\nfor m in range(2, 6):\n polygon(80, 11, m, fill='yellow')\n color('black')\n forward(140)\n\ndone()\n", - "execution_count": 1, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"640\" height=\"480\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\" opacity=\"0\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"-250\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_4.end\"></animate></line><line x1=\"-250\" y1=\"0\" x2=\"-250\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_7\" attributename=\"x2\" attributetype=\"XML\" from=\"-250\" to=\"-170\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_6.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-170\" y1=\"0\" x2=\"-170\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_9\" attributename=\"x2\" attributetype=\"XML\" from=\"-170\" to=\"-136.7667989598491\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_8.end\" from=\"0\" to=\"-72.77055962836147\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-136.7667989598491\" y1=\"-72.77055962836147\" x2=\"-136.7667989598491\" y2=\"-72.77055962836147\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_11\" attributename=\"x2\" attributetype=\"XML\" from=\"-136.7667989598491\" to=\"-189.1556576754719\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_10.end\" from=\"-72.77055962836147\" to=\"-133.23052557670212\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-189.1556576754719\" y1=\"-133.23052557670212\" x2=\"-189.1556576754719\" y2=\"-133.23052557670212\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_13\" attributename=\"x2\" attributetype=\"XML\" from=\"-189.1556576754719\" to=\"-265.91509556463166\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_12.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_12.end\" from=\"-133.23052557670212\" to=\"-110.69192102938774\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-265.91509556463166\" y1=\"-110.69192102938774\" x2=\"-265.91509556463166\" y2=\"-110.69192102938774\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_15\" attributename=\"x2\" attributetype=\"XML\" from=\"-265.91509556463166\" to=\"-277.3002826264945\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_14.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_14.end\" from=\"-110.69192102938774\" to=\"-31.506205678913133\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-277.3002826264945\" y1=\"-31.506205678913133\" x2=\"-277.3002826264945\" y2=\"-31.506205678913133\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_17\" attributename=\"x2\" attributetype=\"XML\" from=\"-277.3002826264945\" to=\"-210.00000000000003\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_16.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_16.end\" from=\"-31.506205678913133\" to=\"11.745059717534723\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-210.00000000000003\" y1=\"11.745059717534723\" x2=\"-210.00000000000003\" y2=\"11.745059717534723\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_19\" attributename=\"x2\" attributetype=\"XML\" from=\"-210.00000000000003\" to=\"-142.6997173735055\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_18.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_18.end\" from=\"11.745059717534723\" to=\"-31.506205678913048\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-142.6997173735055\" y1=\"-31.506205678913048\" x2=\"-142.6997173735055\" y2=\"-31.506205678913048\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_21\" attributename=\"x2\" attributetype=\"XML\" from=\"-142.6997173735055\" to=\"-154.08490443536823\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_20.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_20.end\" from=\"-31.506205678913048\" to=\"-110.69192102938769\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-154.08490443536823\" y1=\"-110.69192102938769\" x2=\"-154.08490443536823\" y2=\"-110.69192102938769\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_23\" attributename=\"x2\" attributetype=\"XML\" from=\"-154.08490443536823\" to=\"-230.84434232452801\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_22.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_22.end\" from=\"-110.69192102938769\" to=\"-133.23052557670206\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-230.84434232452801\" y1=\"-133.23052557670206\" x2=\"-230.84434232452801\" y2=\"-133.23052557670206\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_25\" attributename=\"x2\" attributetype=\"XML\" from=\"-230.84434232452801\" to=\"-283.2332010401508\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_24.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_24.end\" from=\"-133.23052557670206\" to=\"-72.77055962836135\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-283.2332010401508\" y1=\"-72.77055962836135\" x2=\"-283.2332010401508\" y2=\"-72.77055962836135\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_27\" attributename=\"x2\" attributetype=\"XML\" from=\"-283.2332010401508\" to=\"-249.99999999999986\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_26.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_26.end\" from=\"-72.77055962836135\" to=\"1.1368683772161603e-13\" dur=\"1ms\" fill=\"freeze\"></animate></line><polygon points=\"-250.0,-0.0 -170.0,-0.0 -136.7667989598491,-72.77055962836147 -189.1556576754719,-133.23052557670212 -265.91509556463166,-110.69192102938774 -277.3002826264945,-31.506205678913133 -210.00000000000003,11.745059717534723 -142.6997173735055,-31.506205678913048 -154.08490443536823,-110.69192102938769 -230.84434232452801,-133.23052557670206 -283.2332010401508,-72.77055962836135 -249.99999999999986,1.1368683772161603e-13\" style=\"display: none;fill: yellow;stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_29\" attributename=\"display\" attributetype=\"CSS\" from=\"block\" to=\"block\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_28.end\"></animate></polygon><line x1=\"-249.99999999999986\" y1=\"1.1368683772161603e-13\" x2=\"-249.99999999999986\" y2=\"1.1368683772161603e-13\" style=\"stroke: black;stroke-width: 1\" opacity=\"0\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_32\" attributename=\"x2\" attributetype=\"XML\" from=\"-249.99999999999986\" to=\"-109.99999999999986\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_31.end\"></animate></line><line x1=\"-109.99999999999986\" y1=\"-6.642289904216728e-14\" x2=\"-109.99999999999986\" y2=\"-6.642289904216728e-14\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_34\" attributename=\"x2\" attributetype=\"XML\" from=\"-109.99999999999986\" to=\"-29.999999999999858\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_33.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_33.end\" from=\"-6.642289904216728e-14\" to=\"-1.6934274862147202e-13\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-29.999999999999858\" y1=\"-1.6934274862147202e-13\" x2=\"-29.999999999999858\" y2=\"-1.6934274862147202e-13\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_36\" attributename=\"x2\" attributetype=\"XML\" from=\"-29.999999999999858\" to=\"-41.38518706186269\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_35.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_35.end\" from=\"-1.6934274862147202e-13\" to=\"-79.18571535047478\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-41.38518706186269\" y1=\"-79.18571535047478\" x2=\"-41.38518706186269\" y2=\"-79.18571535047478\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_38\" attributename=\"x2\" attributetype=\"XML\" from=\"-41.38518706186269\" to=\"-118.14462495102242\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_37.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_37.end\" from=\"-79.18571535047478\" to=\"-56.64711080316019\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-118.14462495102242\" y1=\"-56.64711080316019\" x2=\"-118.14462495102242\" y2=\"-56.64711080316019\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_40\" attributename=\"x2\" attributetype=\"XML\" from=\"-118.14462495102242\" to=\"-84.91142391087126\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_39.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_39.end\" from=\"-56.64711080316019\" to=\"16.123448825201166\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-84.91142391087126\" y1=\"16.123448825201166\" x2=\"-84.91142391087126\" y2=\"16.123448825201166\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_42\" attributename=\"x2\" attributetype=\"XML\" from=\"-84.91142391087126\" to=\"-17.61114128437687\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_41.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_41.end\" from=\"16.123448825201166\" to=\"-27.12781657124681\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-17.61114128437687\" y1=\"-27.12781657124681\" x2=\"-17.61114128437687\" y2=\"-27.12781657124681\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_44\" attributename=\"x2\" attributetype=\"XML\" from=\"-17.61114128437687\" to=\"-69.99999999999997\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_43.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_43.end\" from=\"-27.12781657124681\" to=\"-87.58778251958722\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-69.99999999999997\" y1=\"-87.58778251958722\" x2=\"-69.99999999999997\" y2=\"-87.58778251958722\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_46\" attributename=\"x2\" attributetype=\"XML\" from=\"-69.99999999999997\" to=\"-122.38885871562232\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_45.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_45.end\" from=\"-87.58778251958722\" to=\"-27.127816571246157\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-122.38885871562232\" y1=\"-27.127816571246157\" x2=\"-122.38885871562232\" y2=\"-27.127816571246157\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_48\" attributename=\"x2\" attributetype=\"XML\" from=\"-122.38885871562232\" to=\"-55.08857608912754\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_47.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_47.end\" from=\"-27.127816571246157\" to=\"16.12344882520121\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-55.08857608912754\" y1=\"16.12344882520121\" x2=\"-55.08857608912754\" y2=\"16.12344882520121\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_50\" attributename=\"x2\" attributetype=\"XML\" from=\"-55.08857608912754\" to=\"-21.85537504897728\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_49.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_49.end\" from=\"16.12344882520121\" to=\"-56.64711080316056\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-21.85537504897728\" y1=\"-56.64711080316056\" x2=\"-21.85537504897728\" y2=\"-56.64711080316056\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_52\" attributename=\"x2\" attributetype=\"XML\" from=\"-21.85537504897728\" to=\"-98.61481293813725\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_51.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_51.end\" from=\"-56.64711080316056\" to=\"-79.18571535047433\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"-98.61481293813725\" y1=\"-79.18571535047433\" x2=\"-98.61481293813725\" y2=\"-79.18571535047433\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_54\" attributename=\"x2\" attributetype=\"XML\" from=\"-98.61481293813725\" to=\"-109.99999999999923\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_53.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_53.end\" from=\"-79.18571535047433\" to=\"4.121147867408581e-13\" dur=\"1ms\" fill=\"freeze\"></animate></line><polygon points=\"-109.99999999999986,-6.642289904216728e-14 -29.999999999999858,-1.6934274862147202e-13 -41.38518706186269,-79.18571535047478 -118.14462495102242,-56.64711080316019 -84.91142391087126,16.123448825201166 -17.61114128437687,-27.12781657124681 -69.99999999999997,-87.58778251958722 -122.38885871562232,-27.127816571246157 -55.08857608912754,16.12344882520121 -21.85537504897728,-56.64711080316056 -98.61481293813725,-79.18571535047433 -109.99999999999923,4.121147867408581e-13\" style=\"display: none;fill: yellow;stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_56\" attributename=\"display\" attributetype=\"CSS\" from=\"block\" to=\"block\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_55.end\"></animate></polygon><line x1=\"-109.99999999999923\" y1=\"4.121147867408581e-13\" x2=\"-109.99999999999923\" y2=\"4.121147867408581e-13\" style=\"stroke: black;stroke-width: 1\" opacity=\"0\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_59\" attributename=\"x2\" attributetype=\"XML\" from=\"-109.99999999999923\" to=\"30.000000000000767\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_58.end\"></animate></line><line x1=\"30.000000000000767\" y1=\"-1.405954321506793e-12\" x2=\"30.000000000000767\" y2=\"-1.405954321506793e-12\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_61\" attributename=\"x2\" attributetype=\"XML\" from=\"30.000000000000767\" to=\"110.00000000000077\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_60.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_60.end\" from=\"-1.405954321506793e-12\" to=\"-2.4448509547911648e-12\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"110.00000000000077\" y1=\"-2.4448509547911648e-12\" x2=\"110.00000000000077\" y2=\"-2.4448509547911648e-12\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_63\" attributename=\"x2\" attributetype=\"XML\" from=\"110.00000000000077\" to=\"57.611141284377254\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_62.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_62.end\" from=\"-2.4448509547911648e-12\" to=\"-60.4599659483425\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"57.611141284377254\" y1=\"-60.4599659483425\" x2=\"57.611141284377254\" y2=\"-60.4599659483425\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_65\" attributename=\"x2\" attributetype=\"XML\" from=\"57.611141284377254\" to=\"46.225954222515256\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_64.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_64.end\" from=\"-60.4599659483425\" to=\"18.725749402132237\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"46.225954222515256\" y1=\"18.725749402132237\" x2=\"46.225954222515256\" y2=\"18.725749402132237\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_67\" attributename=\"x2\" attributetype=\"XML\" from=\"46.225954222515256\" to=\"113.52623684900936\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_66.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_66.end\" from=\"18.725749402132237\" to=\"-24.525515994316166\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"113.52623684900936\" y1=\"-24.525515994316166\" x2=\"113.52623684900936\" y2=\"-24.525515994316166\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_69\" attributename=\"x2\" attributetype=\"XML\" from=\"113.52623684900936\" to=\"36.76679895984924\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_68.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_68.end\" from=\"-24.525515994316166\" to=\"-47.06412054162942\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"36.76679895984924\" y1=\"-47.06412054162942\" x2=\"36.76679895984924\" y2=\"-47.06412054162942\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_71\" attributename=\"x2\" attributetype=\"XML\" from=\"36.76679895984924\" to=\"70.00000000000111\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_70.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_70.end\" from=\"-47.06412054162942\" to=\"25.706439086731606\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"70.00000000000111\" y1=\"25.706439086731606\" x2=\"70.00000000000111\" y2=\"25.706439086731606\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_73\" attributename=\"x2\" attributetype=\"XML\" from=\"70.00000000000111\" to=\"103.23320104015065\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_72.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_72.end\" from=\"25.706439086731606\" to=\"-47.06412054163049\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"103.23320104015065\" y1=\"-47.06412054163049\" x2=\"103.23320104015065\" y2=\"-47.06412054163049\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_75\" attributename=\"x2\" attributetype=\"XML\" from=\"103.23320104015065\" to=\"26.473763150991246\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_74.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_74.end\" from=\"-47.06412054163049\" to=\"-24.525515994314766\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"26.473763150991246\" y1=\"-24.525515994314766\" x2=\"26.473763150991246\" y2=\"-24.525515994314766\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_77\" attributename=\"x2\" attributetype=\"XML\" from=\"26.473763150991246\" to=\"93.77404577748644\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_76.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_76.end\" from=\"-24.525515994314766\" to=\"18.725749402131953\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"93.77404577748644\" y1=\"18.725749402131953\" x2=\"93.77404577748644\" y2=\"18.725749402131953\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_79\" attributename=\"x2\" attributetype=\"XML\" from=\"93.77404577748644\" to=\"82.3888587156219\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_78.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_78.end\" from=\"18.725749402131953\" to=\"-60.459965948342415\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"82.3888587156219\" y1=\"-60.459965948342415\" x2=\"82.3888587156219\" y2=\"-60.459965948342415\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_81\" attributename=\"x2\" attributetype=\"XML\" from=\"82.3888587156219\" to=\"30.000000000000327\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_80.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_80.end\" from=\"-60.459965948342415\" to=\"-6.821210263296962e-13\" dur=\"1ms\" fill=\"freeze\"></animate></line><polygon points=\"30.000000000000767,-1.405954321506793e-12 110.00000000000077,-2.4448509547911648e-12 57.611141284377254,-60.4599659483425 46.225954222515256,18.725749402132237 113.52623684900936,-24.525515994316166 36.76679895984924,-47.06412054162942 70.00000000000111,25.706439086731606 103.23320104015065,-47.06412054163049 26.473763150991246,-24.525515994314766 93.77404577748644,18.725749402131953 82.3888587156219,-60.459965948342415 30.000000000000327,-6.821210263296962e-13\" style=\"display: none;fill: yellow;stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_83\" attributename=\"display\" attributetype=\"CSS\" from=\"block\" to=\"block\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_82.end\"></animate></polygon><line x1=\"30.000000000000327\" y1=\"-6.821210263296962e-13\" x2=\"30.000000000000327\" y2=\"-6.821210263296962e-13\" style=\"stroke: black;stroke-width: 1\" opacity=\"0\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_86\" attributename=\"x2\" attributetype=\"XML\" from=\"30.000000000000327\" to=\"170.00000000000034\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_85.end\"></animate></line><line x1=\"170.00000000000034\" y1=\"-4.352549353201124e-12\" x2=\"170.00000000000034\" y2=\"-4.352549353201124e-12\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_88\" attributename=\"x2\" attributetype=\"XML\" from=\"170.00000000000034\" to=\"250.00000000000034\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_87.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_87.end\" from=\"-4.352549353201124e-12\" to=\"-6.449936968556225e-12\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"250.00000000000034\" y1=\"-6.449936968556225e-12\" x2=\"250.00000000000034\" y2=\"-6.449936968556225e-12\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_90\" attributename=\"x2\" attributetype=\"XML\" from=\"250.00000000000034\" to=\"173.24056211084007\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_89.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_89.end\" from=\"-6.449936968556225e-12\" to=\"-22.53860454731922\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"173.24056211084007\" y1=\"-22.53860454731922\" x2=\"173.24056211084007\" y2=\"-22.53860454731922\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_92\" attributename=\"x2\" attributetype=\"XML\" from=\"173.24056211084007\" to=\"240.54084473733525\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_91.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_91.end\" from=\"-22.53860454731922\" to=\"20.712660849127534\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"240.54084473733525\" y1=\"20.712660849127534\" x2=\"240.54084473733525\" y2=\"20.712660849127534\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_94\" attributename=\"x2\" attributetype=\"XML\" from=\"240.54084473733525\" to=\"188.15198602171182\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_93.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_93.end\" from=\"20.712660849127534\" to=\"-39.74730509921258\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"188.15198602171182\" y1=\"-39.74730509921258\" x2=\"188.15198602171182\" y2=\"-39.74730509921258\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_96\" attributename=\"x2\" attributetype=\"XML\" from=\"188.15198602171182\" to=\"221.38518706186363\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_95.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_95.end\" from=\"-39.74730509921258\" to=\"33.02325452914849\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"221.38518706186363\" y1=\"33.02325452914849\" x2=\"221.38518706186363\" y2=\"33.02325452914849\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_98\" attributename=\"x2\" attributetype=\"XML\" from=\"221.38518706186363\" to=\"209.99999999999972\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_97.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_97.end\" from=\"33.02325452914849\" to=\"-46.162460821325965\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"209.99999999999972\" y1=\"-46.162460821325965\" x2=\"209.99999999999972\" y2=\"-46.162460821325965\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_100\" attributename=\"x2\" attributetype=\"XML\" from=\"209.99999999999972\" to=\"198.61481293813816\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_99.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_99.end\" from=\"-46.162460821325965\" to=\"33.02325452914883\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"198.61481293813816\" y1=\"33.02325452914883\" x2=\"198.61481293813816\" y2=\"33.02325452914883\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_102\" attributename=\"x2\" attributetype=\"XML\" from=\"198.61481293813816\" to=\"231.84801397828778\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_101.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_101.end\" from=\"33.02325452914883\" to=\"-39.747305099213236\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"231.84801397828778\" y1=\"-39.747305099213236\" x2=\"231.84801397828778\" y2=\"-39.747305099213236\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_104\" attributename=\"x2\" attributetype=\"XML\" from=\"231.84801397828778\" to=\"179.45915526266702\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_103.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_103.end\" from=\"-39.747305099213236\" to=\"20.712660849129193\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"179.45915526266702\" y1=\"20.712660849129193\" x2=\"179.45915526266702\" y2=\"20.712660849129193\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_106\" attributename=\"x2\" attributetype=\"XML\" from=\"179.45915526266702\" to=\"246.75943788915998\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_105.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_105.end\" from=\"20.712660849129193\" to=\"-22.538604547321007\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"246.75943788915998\" y1=\"-22.538604547321007\" x2=\"246.75943788915998\" y2=\"-22.538604547321007\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_108\" attributename=\"x2\" attributetype=\"XML\" from=\"246.75943788915998\" to=\"170.00000000000102\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_107.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_107.end\" from=\"-22.538604547321007\" to=\"-3.75877107217093e-12\" dur=\"1ms\" fill=\"freeze\"></animate></line><polygon points=\"170.00000000000034,-4.352549353201124e-12 250.00000000000034,-6.449936968556225e-12 173.24056211084007,-22.53860454731922 240.54084473733525,20.712660849127534 188.15198602171182,-39.74730509921258 221.38518706186363,33.02325452914849 209.99999999999972,-46.162460821325965 198.61481293813816,33.02325452914883 231.84801397828778,-39.747305099213236 179.45915526266702,20.712660849129193 246.75943788915998,-22.538604547321007 170.00000000000102,-3.75877107217093e-12\" style=\"display: none;fill: yellow;stroke: black;stroke-width: 1\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_110\" attributename=\"display\" attributetype=\"CSS\" from=\"block\" to=\"block\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_109.end\"></animate></polygon><line x1=\"170.00000000000102\" y1=\"-3.75877107217093e-12\" x2=\"170.00000000000102\" y2=\"-3.75877107217093e-12\" style=\"stroke: black;stroke-width: 1\" opacity=\"0\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_113\" attributename=\"x2\" attributetype=\"XML\" from=\"170.00000000000102\" to=\"310.000000000001\" dur=\"1ms\" fill=\"freeze\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_112.end\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_1\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"-250.0,-0.0\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_4.end\" fill=\"freeze\"></animateMotion><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_6\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_5.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"yellow\"></animate><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-250.0,-0.0\" to=\"-170.0,-0.0\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_8\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-155.45454545454544,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_7.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-170.0,-0.0\" to=\"-136.7667989598491,-72.77055962836147\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_8.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_10\" type=\"rotate\" from=\"-155.45454545454544,0,0\" to=\"-220.90909090909088,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_9.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-136.7667989598491,-72.77055962836147\" to=\"-189.1556576754719,-133.23052557670212\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_10.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_12\" type=\"rotate\" from=\"-220.90909090909088,0,0\" to=\"-286.3636363636363,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_11.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_12.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-189.1556576754719,-133.23052557670212\" to=\"-265.91509556463166,-110.69192102938774\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_12.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_13.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_14\" type=\"rotate\" from=\"-286.3636363636363,0,0\" to=\"-351.81818181818176,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_13.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_14.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-265.91509556463166,-110.69192102938774\" to=\"-277.3002826264945,-31.506205678913133\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_14.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_15.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_16\" type=\"rotate\" from=\"-351.81818181818176,0,0\" to=\"-417.2727272727272,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_15.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_16.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-277.3002826264945,-31.506205678913133\" to=\"-210.00000000000003,11.745059717534723\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_16.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_17.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_18\" type=\"rotate\" from=\"-417.2727272727272,0,0\" to=\"-482.72727272727263,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_17.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_18.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-210.00000000000003,11.745059717534723\" to=\"-142.6997173735055,-31.506205678913048\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_18.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_19.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_20\" type=\"rotate\" from=\"-482.72727272727263,0,0\" to=\"-548.1818181818181,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_19.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_20.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-142.6997173735055,-31.506205678913048\" to=\"-154.08490443536823,-110.69192102938769\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_20.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_21.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_22\" type=\"rotate\" from=\"-548.1818181818181,0,0\" to=\"-613.6363636363636,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_21.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_22.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-154.08490443536823,-110.69192102938769\" to=\"-230.84434232452801,-133.23052557670206\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_22.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_23.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_24\" type=\"rotate\" from=\"-613.6363636363636,0,0\" to=\"-679.0909090909091,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_23.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_24.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-230.84434232452801,-133.23052557670206\" to=\"-283.2332010401508,-72.77055962836135\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_24.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_25.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_26\" type=\"rotate\" from=\"-679.0909090909091,0,0\" to=\"-744.5454545454546,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_25.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_26.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-283.2332010401508,-72.77055962836135\" to=\"-249.99999999999986,1.1368683772161603e-13\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_26.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_27.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_28\" type=\"rotate\" from=\"-744.5454545454546,0,0\" to=\"-810.0000000000001,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_27.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_30\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_29.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"black\"></animate><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_31\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_30.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"yellow\" to=\"black\"></animate><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_31.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-249.99999999999986,1.1368683772161603e-13\" to=\"-109.99999999999986,-6.642289904216728e-14\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_31.end\" fill=\"freeze\"></animateMotion><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_33\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_32.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"yellow\"></animate><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_33.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-109.99999999999986,-6.642289904216728e-14\" to=\"-29.999999999999858,-1.6934274862147202e-13\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_33.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_34.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_35\" type=\"rotate\" from=\"-810.0000000000001,0,0\" to=\"-908.1818181818182,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_34.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_35.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-29.999999999999858,-1.6934274862147202e-13\" to=\"-41.38518706186269,-79.18571535047478\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_35.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_36.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_37\" type=\"rotate\" from=\"-908.1818181818182,0,0\" to=\"-1006.3636363636365,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_36.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_37.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-41.38518706186269,-79.18571535047478\" to=\"-118.14462495102242,-56.64711080316019\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_37.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_38.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_39\" type=\"rotate\" from=\"-1006.3636363636365,0,0\" to=\"-1104.5454545454547,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_38.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_39.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-118.14462495102242,-56.64711080316019\" to=\"-84.91142391087126,16.123448825201166\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_39.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_40.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_41\" type=\"rotate\" from=\"-1104.5454545454547,0,0\" to=\"-1202.727272727273,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_40.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_41.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-84.91142391087126,16.123448825201166\" to=\"-17.61114128437687,-27.12781657124681\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_41.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_42.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_43\" type=\"rotate\" from=\"-1202.727272727273,0,0\" to=\"-1300.9090909090912,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_42.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_43.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-17.61114128437687,-27.12781657124681\" to=\"-69.99999999999997,-87.58778251958722\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_43.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_44.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_45\" type=\"rotate\" from=\"-1300.9090909090912,0,0\" to=\"-1399.0909090909095,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_44.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_45.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-69.99999999999997,-87.58778251958722\" to=\"-122.38885871562232,-27.127816571246157\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_45.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_46.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_47\" type=\"rotate\" from=\"-1399.0909090909095,0,0\" to=\"-1497.2727272727277,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_46.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_47.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-122.38885871562232,-27.127816571246157\" to=\"-55.08857608912754,16.12344882520121\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_47.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_48.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_49\" type=\"rotate\" from=\"-1497.2727272727277,0,0\" to=\"-1595.454545454546,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_48.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_49.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-55.08857608912754,16.12344882520121\" to=\"-21.85537504897728,-56.64711080316056\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_49.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_50.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_51\" type=\"rotate\" from=\"-1595.454545454546,0,0\" to=\"-1693.6363636363642,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_50.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_51.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-21.85537504897728,-56.64711080316056\" to=\"-98.61481293813725,-79.18571535047433\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_51.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_52.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_53\" type=\"rotate\" from=\"-1693.6363636363642,0,0\" to=\"-1791.8181818181824,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_52.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_53.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-98.61481293813725,-79.18571535047433\" to=\"-109.99999999999923,4.121147867408581e-13\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_53.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_54.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_55\" type=\"rotate\" from=\"-1791.8181818181824,0,0\" to=\"-1890.0000000000007,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_54.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_57\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_56.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"black\"></animate><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_58\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_57.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"yellow\" to=\"black\"></animate><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_58.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-109.99999999999923,4.121147867408581e-13\" to=\"30.000000000000767,-1.405954321506793e-12\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_58.end\" fill=\"freeze\"></animateMotion><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_60\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_59.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"yellow\"></animate><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_60.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"30.000000000000767,-1.405954321506793e-12\" to=\"110.00000000000077,-2.4448509547911648e-12\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_60.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_61.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_62\" type=\"rotate\" from=\"-1890.0000000000007,0,0\" to=\"-2020.9090909090917,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_61.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_62.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"110.00000000000077,-2.4448509547911648e-12\" to=\"57.611141284377254,-60.4599659483425\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_62.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_63.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_64\" type=\"rotate\" from=\"-2020.9090909090917,0,0\" to=\"-2151.8181818181824,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_63.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_64.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"57.611141284377254,-60.4599659483425\" to=\"46.225954222515256,18.725749402132237\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_64.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_65.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_66\" type=\"rotate\" from=\"-2151.8181818181824,0,0\" to=\"-2282.7272727272734,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_65.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_66.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"46.225954222515256,18.725749402132237\" to=\"113.52623684900936,-24.525515994316166\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_66.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_67.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_68\" type=\"rotate\" from=\"-2282.7272727272734,0,0\" to=\"-2413.6363636363644,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_67.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_68.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"113.52623684900936,-24.525515994316166\" to=\"36.76679895984924,-47.06412054162942\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_68.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_69.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_70\" type=\"rotate\" from=\"-2413.6363636363644,0,0\" to=\"-2544.5454545454554,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_69.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_70.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"36.76679895984924,-47.06412054162942\" to=\"70.00000000000111,25.706439086731606\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_70.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_71.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_72\" type=\"rotate\" from=\"-2544.5454545454554,0,0\" to=\"-2675.4545454545464,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_71.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_72.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"70.00000000000111,25.706439086731606\" to=\"103.23320104015065,-47.06412054163049\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_72.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_73.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_74\" type=\"rotate\" from=\"-2675.4545454545464,0,0\" to=\"-2806.3636363636374,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_73.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_74.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"103.23320104015065,-47.06412054163049\" to=\"26.473763150991246,-24.525515994314766\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_74.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_75.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_76\" type=\"rotate\" from=\"-2806.3636363636374,0,0\" to=\"-2937.2727272727284,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_75.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_76.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"26.473763150991246,-24.525515994314766\" to=\"93.77404577748644,18.725749402131953\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_76.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_77.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_78\" type=\"rotate\" from=\"-2937.2727272727284,0,0\" to=\"-3068.1818181818194,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_77.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_78.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"93.77404577748644,18.725749402131953\" to=\"82.3888587156219,-60.459965948342415\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_78.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_79.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_80\" type=\"rotate\" from=\"-3068.1818181818194,0,0\" to=\"-3199.0909090909104,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_79.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_80.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"82.3888587156219,-60.459965948342415\" to=\"30.000000000000327,-6.821210263296962e-13\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_80.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_81.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_82\" type=\"rotate\" from=\"-3199.0909090909104,0,0\" to=\"-3330.0000000000014,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_81.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_84\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_83.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"black\"></animate><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_85\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_84.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"yellow\" to=\"black\"></animate><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_85.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"30.000000000000327,-6.821210263296962e-13\" to=\"170.00000000000034,-4.352549353201124e-12\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_85.end\" fill=\"freeze\"></animateMotion><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_87\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_86.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"black\" to=\"yellow\"></animate><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_87.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"170.00000000000034,-4.352549353201124e-12\" to=\"250.00000000000034,-6.449936968556225e-12\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_87.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_88.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_89\" type=\"rotate\" from=\"-3330.0000000000014,0,0\" to=\"-3493.636363636365,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_88.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_89.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"250.00000000000034,-6.449936968556225e-12\" to=\"173.24056211084007,-22.53860454731922\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_89.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_90.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_91\" type=\"rotate\" from=\"-3493.636363636365,0,0\" to=\"-3657.2727272727284,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_90.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_91.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"173.24056211084007,-22.53860454731922\" to=\"240.54084473733525,20.712660849127534\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_91.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_92.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_93\" type=\"rotate\" from=\"-3657.2727272727284,0,0\" to=\"-3820.909090909092,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_92.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_93.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"240.54084473733525,20.712660849127534\" to=\"188.15198602171182,-39.74730509921258\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_93.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_94.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_95\" type=\"rotate\" from=\"-3820.909090909092,0,0\" to=\"-3984.5454545454554,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_94.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_95.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"188.15198602171182,-39.74730509921258\" to=\"221.38518706186363,33.02325452914849\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_95.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_96.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_97\" type=\"rotate\" from=\"-3984.5454545454554,0,0\" to=\"-4148.181818181819,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_96.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_97.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"221.38518706186363,33.02325452914849\" to=\"209.99999999999972,-46.162460821325965\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_97.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_98.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_99\" type=\"rotate\" from=\"-4148.181818181819,0,0\" to=\"-4311.818181818183,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_98.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_99.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"209.99999999999972,-46.162460821325965\" to=\"198.61481293813816,33.02325452914883\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_99.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_100.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_101\" type=\"rotate\" from=\"-4311.818181818183,0,0\" to=\"-4475.454545454547,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_100.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_101.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"198.61481293813816,33.02325452914883\" to=\"231.84801397828778,-39.747305099213236\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_101.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_102.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_103\" type=\"rotate\" from=\"-4475.454545454547,0,0\" to=\"-4639.090909090911,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_102.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_103.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"231.84801397828778,-39.747305099213236\" to=\"179.45915526266702,20.712660849129193\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_103.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_104.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_105\" type=\"rotate\" from=\"-4639.090909090911,0,0\" to=\"-4802.727272727275,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_104.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_105.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"179.45915526266702,20.712660849129193\" to=\"246.75943788915998,-22.538604547321007\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_105.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_106.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_107\" type=\"rotate\" from=\"-4802.727272727275,0,0\" to=\"-4966.363636363639,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_106.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_107.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"246.75943788915998,-22.538604547321007\" to=\"170.00000000000102,-3.75877107217093e-12\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_107.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_108.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_42050229cc1c4f528d1bb74c18fc0423_109\" type=\"rotate\" from=\"-4966.363636363639,0,0\" to=\"-5130.000000000003,0,0\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_108.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_111\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_110.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"stroke\" attributetype=\"XML\" from=\"black\" to=\"black\"></animate><animate id=\"af_42050229cc1c4f528d1bb74c18fc0423_112\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_111.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"fill\" attributetype=\"XML\" from=\"yellow\" to=\"black\"></animate><animateMotion begin=\"af_42050229cc1c4f528d1bb74c18fc0423_112.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"170.00000000000102,-3.75877107217093e-12\" to=\"310.000000000001,-9.247268507290008e-12\" dur=\"1ms\" begin=\"af_42050229cc1c4f528d1bb74c18fc0423_112.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\ndef polygon(d, n, m=1, w=1, pen='black', fill='white'):\n down()\n pencolor(pen)\n width(w)\n fillcolor(fill)\n begin_fill()\n for i in range(n):\n forward(d)\n left(m*360/n)\n end_fill()\n up()\n\nup()\nspeed(0)\nbackward(250)\nfor m in range(2, 6):\n polygon(80, 11, m, fill='yellow')\n color('black')\n forward(140)\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 12 </h3>\n\nUtilisez la fonction `rectangle(p, d, e, w, pen, fill)` pour dessiner une copie de ce tableau de Mondrian.\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "\n\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "---\n\n#### Remarque générale\n\nCe document est une adaptation d'un ressource pédagogique tiré du catalogue modulo https://modulo-info.ch/. Il est sous license Creative Commons [BY-NC-SA](https://creativecommons.org/licenses/?lang=fr)\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "" } ], "metadata": { diff --git a/Notebooks/Exo_supp.ipynb b/Notebooks/Exo_supp.ipynb index f5d64fd5642b486953958085f712e9a13ff7c165..ff6f320063b9d5b5638660f8667678fc8afe5258 100644 --- a/Notebooks/Exo_supp.ipynb +++ b/Notebooks/Exo_supp.ipynb @@ -1,111 +1,111 @@ { "cells": [ { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### Paquebot\n\nUne boucle `for` est utilisée dans l'exemple suivant pour dessiner les hublots d'un paquebot. Les hublots sont numérotés en utilisant la variable `i`.\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 8 </h3>\n\nCréez une fonction `paquebot()` et dessinez-en un deuxième.\n" }, { + "cell_type": "code", + "execution_count": 1, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nforward(200)\nleft(80)\nforward(60)\nleft(100)\nforward(220)\nleft(100)\nforward(60)\n\nup()\nleft(125)\nforward(40)\nright(45)\n\nfor i in range(6):\n dot(20, 'lightgray')\n write(i, font=('Arial', 20, 'normal'))\n forward(30)\n\ndone()", - "execution_count": 1, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"50%\" height=\"auto\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_c15caa80776d4f93896328234a9ad966_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"200\" dur=\" 1.070s\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_c15caa80776d4f93896328234a9ad966_4.end\" from=\"0\" to=\"0\" dur=\" 1.070s\" fill=\"freeze\"></animate></line><line x1=\"200\" y1=\"0\" x2=\"200\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_7\" attributename=\"x2\" attributetype=\"XML\" from=\"200\" to=\"210.41889066001582\" dur=\" 0.321s\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_c15caa80776d4f93896328234a9ad966_6.end\" from=\"0\" to=\"-59.088465180732484\" dur=\" 0.321s\" fill=\"freeze\"></animate></line><line x1=\"210.41889066001582\" y1=\"-59.088465180732484\" x2=\"210.41889066001582\" y2=\"-59.088465180732484\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_9\" attributename=\"x2\" attributetype=\"XML\" from=\"210.41889066001582\" to=\"-9.581109339984181\" dur=\" 1.177s\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_c15caa80776d4f93896328234a9ad966_8.end\" from=\"-59.088465180732484\" to=\"-59.08846518073251\" dur=\" 1.177s\" fill=\"freeze\"></animate></line><line x1=\"-9.581109339984181\" y1=\"-59.08846518073251\" x2=\"-9.581109339984181\" y2=\"-59.08846518073251\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_11\" attributename=\"x2\" attributetype=\"XML\" from=\"-9.581109339984181\" to=\"0.8377813200316169\" dur=\" 0.321s\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_c15caa80776d4f93896328234a9ad966_10.end\" from=\"-59.08846518073251\" to=\"-2.842170943040401e-14\" dur=\" 0.321s\" fill=\"freeze\"></animate></line><line x1=\"0.8377813200316169\" y1=\"-2.842170943040401e-14\" x2=\"0.8377813200316169\" y2=\"-2.842170943040401e-14\" style=\"stroke: black;stroke-width: 1\" opacity=\"0\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_13\" attributename=\"x2\" attributetype=\"XML\" from=\"0.8377813200316169\" to=\"29.122052567493526\" dur=\" 0.214s\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_12.end\"></animate></line><circle cx=\"29.122052567493526\" cy=\"-28.284271247461923\" r=\"10\" fill=\"lightgray\" style=\"display: none;\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_15\" attributename=\"display\" attributetype=\"CSS\" from=\"block\" to=\"block\" dur=\"1ms\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_14.end\"></animate></circle><line x1=\"29.122052567493526\" y1=\"-28.284271247461923\" x2=\"29.122052567493526\" y2=\"-28.284271247461923\" style=\"stroke: black;stroke-width: 1\" opacity=\"0\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_17\" attributename=\"x2\" attributetype=\"XML\" from=\"29.122052567493526\" to=\"59.122052567493526\" dur=\" 0.161s\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_16.end\"></animate></line><circle cx=\"59.122052567493526\" cy=\"-28.284271247461916\" r=\"10\" fill=\"lightgray\" style=\"display: none;\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_18\" attributename=\"display\" attributetype=\"CSS\" from=\"block\" to=\"block\" dur=\"1ms\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_17.end\"></animate></circle><line x1=\"59.122052567493526\" y1=\"-28.284271247461916\" x2=\"59.122052567493526\" y2=\"-28.284271247461916\" style=\"stroke: black;stroke-width: 1\" opacity=\"0\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_20\" attributename=\"x2\" attributetype=\"XML\" from=\"59.122052567493526\" to=\"89.12205256749353\" dur=\" 0.161s\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_19.end\"></animate></line><circle cx=\"89.12205256749353\" cy=\"-28.28427124746191\" r=\"10\" fill=\"lightgray\" style=\"display: none;\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_21\" attributename=\"display\" attributetype=\"CSS\" from=\"block\" to=\"block\" dur=\"1ms\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_20.end\"></animate></circle><line x1=\"89.12205256749353\" y1=\"-28.28427124746191\" x2=\"89.12205256749353\" y2=\"-28.28427124746191\" style=\"stroke: black;stroke-width: 1\" opacity=\"0\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_23\" attributename=\"x2\" attributetype=\"XML\" from=\"89.12205256749353\" to=\"119.12205256749353\" dur=\" 0.161s\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_22.end\"></animate></line><circle cx=\"119.12205256749353\" cy=\"-28.284271247461902\" r=\"10\" fill=\"lightgray\" style=\"display: none;\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_24\" attributename=\"display\" attributetype=\"CSS\" from=\"block\" to=\"block\" dur=\"1ms\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_23.end\"></animate></circle><line x1=\"119.12205256749353\" y1=\"-28.284271247461902\" x2=\"119.12205256749353\" y2=\"-28.284271247461902\" style=\"stroke: black;stroke-width: 1\" opacity=\"0\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_26\" attributename=\"x2\" attributetype=\"XML\" from=\"119.12205256749353\" to=\"149.12205256749354\" dur=\" 0.161s\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_25.end\"></animate></line><circle cx=\"149.12205256749354\" cy=\"-28.284271247461895\" r=\"10\" fill=\"lightgray\" style=\"display: none;\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_27\" attributename=\"display\" attributetype=\"CSS\" from=\"block\" to=\"block\" dur=\"1ms\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_26.end\"></animate></circle><line x1=\"149.12205256749354\" y1=\"-28.284271247461895\" x2=\"149.12205256749354\" y2=\"-28.284271247461895\" style=\"stroke: black;stroke-width: 1\" opacity=\"0\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_29\" attributename=\"x2\" attributetype=\"XML\" from=\"149.12205256749354\" to=\"179.12205256749354\" dur=\" 0.161s\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_28.end\"></animate></line><circle cx=\"179.12205256749354\" cy=\"-28.284271247461888\" r=\"10\" fill=\"lightgray\" style=\"display: none;\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_30\" attributename=\"display\" attributetype=\"CSS\" from=\"block\" to=\"block\" dur=\"1ms\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_29.end\"></animate></circle><line x1=\"179.12205256749354\" y1=\"-28.284271247461888\" x2=\"179.12205256749354\" y2=\"-28.284271247461888\" style=\"stroke: black;stroke-width: 1\" opacity=\"0\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_32\" attributename=\"x2\" attributetype=\"XML\" from=\"179.12205256749354\" to=\"209.12205256749354\" dur=\" 0.161s\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_31.end\"></animate></line></g><g transform=\"translate(320 240)\"><text x=\"29.122052567493526\" y=\"-28.284271247461923\" fill=\"black\" style=\"display: none;font-family: Arial;font-size: 20;font-style: normal\" text-anchor=\"start\">0<animate id=\"af_c15caa80776d4f93896328234a9ad966_16\" attributename=\"display\" attributetype=\"CSS\" from=\"block\" to=\"block\" dur=\"1ms\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_15.end\"></animate></text><text x=\"59.122052567493526\" y=\"-28.284271247461916\" fill=\"black\" style=\"display: none;font-family: Arial;font-size: 20;font-style: normal\" text-anchor=\"start\">1<animate id=\"af_c15caa80776d4f93896328234a9ad966_19\" attributename=\"display\" attributetype=\"CSS\" from=\"block\" to=\"block\" dur=\"1ms\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_18.end\"></animate></text><text x=\"89.12205256749353\" y=\"-28.28427124746191\" fill=\"black\" style=\"display: none;font-family: Arial;font-size: 20;font-style: normal\" text-anchor=\"start\">2<animate id=\"af_c15caa80776d4f93896328234a9ad966_22\" attributename=\"display\" attributetype=\"CSS\" from=\"block\" to=\"block\" dur=\"1ms\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_21.end\"></animate></text><text x=\"119.12205256749353\" y=\"-28.284271247461902\" fill=\"black\" style=\"display: none;font-family: Arial;font-size: 20;font-style: normal\" text-anchor=\"start\">3<animate id=\"af_c15caa80776d4f93896328234a9ad966_25\" attributename=\"display\" attributetype=\"CSS\" from=\"block\" to=\"block\" dur=\"1ms\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_24.end\"></animate></text><text x=\"149.12205256749354\" y=\"-28.284271247461895\" fill=\"black\" style=\"display: none;font-family: Arial;font-size: 20;font-style: normal\" text-anchor=\"start\">4<animate id=\"af_c15caa80776d4f93896328234a9ad966_28\" attributename=\"display\" attributetype=\"CSS\" from=\"block\" to=\"block\" dur=\"1ms\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_27.end\"></animate></text><text x=\"179.12205256749354\" y=\"-28.284271247461888\" fill=\"black\" style=\"display: none;font-family: Arial;font-size: 20;font-style: normal\" text-anchor=\"start\">5<animate id=\"af_c15caa80776d4f93896328234a9ad966_31\" attributename=\"display\" attributetype=\"CSS\" from=\"block\" to=\"block\" dur=\"1ms\" fill=\"freeze\" begin=\"af_c15caa80776d4f93896328234a9ad966_30.end\"></animate></text></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_c15caa80776d4f93896328234a9ad966_1\" begin=\"af_c15caa80776d4f93896328234a9ad966_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_c15caa80776d4f93896328234a9ad966_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_c15caa80776d4f93896328234a9ad966_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_c15caa80776d4f93896328234a9ad966_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_c15caa80776d4f93896328234a9ad966_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"200.0,-0.0\" dur=\" 1.070s\" begin=\"af_c15caa80776d4f93896328234a9ad966_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_c15caa80776d4f93896328234a9ad966_6\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-170.0,0,0\" begin=\"af_c15caa80776d4f93896328234a9ad966_5.end\" dur=\" 0.074s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"200.0,-0.0\" to=\"210.41889066001582,-59.088465180732484\" dur=\" 0.321s\" begin=\"af_c15caa80776d4f93896328234a9ad966_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_c15caa80776d4f93896328234a9ad966_8\" type=\"rotate\" from=\"-170.0,0,0\" to=\"-270.0,0,0\" begin=\"af_c15caa80776d4f93896328234a9ad966_7.end\" dur=\" 0.093s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"210.41889066001582,-59.088465180732484\" to=\"-9.581109339984181,-59.08846518073251\" dur=\" 1.177s\" begin=\"af_c15caa80776d4f93896328234a9ad966_8.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_c15caa80776d4f93896328234a9ad966_10\" type=\"rotate\" from=\"-270.0,0,0\" to=\"-370.0,0,0\" begin=\"af_c15caa80776d4f93896328234a9ad966_9.end\" dur=\" 0.093s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-9.581109339984181,-59.08846518073251\" to=\"0.8377813200316169,-2.842170943040401e-14\" dur=\" 0.321s\" begin=\"af_c15caa80776d4f93896328234a9ad966_10.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_c15caa80776d4f93896328234a9ad966_12\" type=\"rotate\" from=\"-370.0,0,0\" to=\"-495.0,0,0\" begin=\"af_c15caa80776d4f93896328234a9ad966_11.end\" dur=\" 0.116s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_12.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.8377813200316169,-2.842170943040401e-14\" to=\"29.122052567493526,-28.284271247461923\" dur=\" 0.214s\" begin=\"af_c15caa80776d4f93896328234a9ad966_12.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_13.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_c15caa80776d4f93896328234a9ad966_14\" type=\"rotate\" from=\"-495.0,0,0\" to=\"-450.0,0,0\" begin=\"af_c15caa80776d4f93896328234a9ad966_13.end\" dur=\" 0.042s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_16.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"29.122052567493526,-28.284271247461923\" to=\"59.122052567493526,-28.284271247461916\" dur=\" 0.161s\" begin=\"af_c15caa80776d4f93896328234a9ad966_16.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_19.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"59.122052567493526,-28.284271247461916\" to=\"89.12205256749353,-28.28427124746191\" dur=\" 0.161s\" begin=\"af_c15caa80776d4f93896328234a9ad966_19.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_22.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"89.12205256749353,-28.28427124746191\" to=\"119.12205256749353,-28.284271247461902\" dur=\" 0.161s\" begin=\"af_c15caa80776d4f93896328234a9ad966_22.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_25.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"119.12205256749353,-28.284271247461902\" to=\"149.12205256749354,-28.284271247461895\" dur=\" 0.161s\" begin=\"af_c15caa80776d4f93896328234a9ad966_25.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_28.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"149.12205256749354,-28.284271247461895\" to=\"179.12205256749354,-28.284271247461888\" dur=\" 0.161s\" begin=\"af_c15caa80776d4f93896328234a9ad966_28.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_c15caa80776d4f93896328234a9ad966_31.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"179.12205256749354,-28.284271247461888\" to=\"209.12205256749354,-28.28427124746188\" dur=\" 0.161s\" begin=\"af_c15caa80776d4f93896328234a9ad966_31.end\" fill=\"freeze\"></animateMotion></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\nforward(200)\nleft(80)\nforward(60)\nleft(100)\nforward(220)\nleft(100)\nforward(60)\n\nup()\nleft(125)\nforward(40)\nright(45)\n\nfor i in range(6):\n dot(20, 'lightgray')\n write(i, font=('Arial', 20, 'normal'))\n forward(30)\n\ndone()" }, { + "cell_type": "markdown", "metadata": { "trusted": true }, - "cell_type": "markdown", "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 12</h3>\n\nAvec des rails de chemin de fer, dessinez un circuit en forme d'un rond (deux rails avec les traverses).\n\n\nUtilisez une boucle `for` pour la répétition des traverses.\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n# Prénom Nom, classe\n\ndef traverse():\n ...\n\nforward(200)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n# Prénom Nom, classe\n\ndef traverse():\n ...\n\nforward(200)\n\ndone()" }, { + "cell_type": "markdown", "metadata": { "trusted": true }, - "cell_type": "markdown", "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 12</h3>\n\nTriangle de sierpinski\n\n" }, { + "cell_type": "code", + "execution_count": 2, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\ndef triangle(l):\n for _ in range(3):\n forward(l)\n left(120)\n\n\n\nx = 50\nfor _ in range(3):\n triangle(x)\n forward(x)\n right(120)\n\ndone()", - "execution_count": 2, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"640\" height=\"480\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_e406a38e2bf040129671b6c27ef65f5d_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e406a38e2bf040129671b6c27ef65f5d_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e406a38e2bf040129671b6c27ef65f5d_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"50\" dur=\" 0.268s\" fill=\"freeze\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_4.end\" from=\"0\" to=\"0\" dur=\" 0.268s\" fill=\"freeze\"></animate></line><line x1=\"50\" y1=\"0\" x2=\"50\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e406a38e2bf040129671b6c27ef65f5d_7\" attributename=\"x2\" attributetype=\"XML\" from=\"50\" to=\"25.00000000000001\" dur=\" 0.268s\" fill=\"freeze\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_6.end\" from=\"0\" to=\"-43.30127018922194\" dur=\" 0.268s\" fill=\"freeze\"></animate></line><line x1=\"25.00000000000001\" y1=\"-43.30127018922194\" x2=\"25.00000000000001\" y2=\"-43.30127018922194\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e406a38e2bf040129671b6c27ef65f5d_9\" attributename=\"x2\" attributetype=\"XML\" from=\"25.00000000000001\" to=\"-1.0658141036401503e-14\" dur=\" 0.268s\" fill=\"freeze\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_8.end\" from=\"-43.30127018922194\" to=\"-1.4210854715202004e-14\" dur=\" 0.268s\" fill=\"freeze\"></animate></line><line x1=\"-1.0658141036401503e-14\" y1=\"-1.4210854715202004e-14\" x2=\"-1.0658141036401503e-14\" y2=\"-1.4210854715202004e-14\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e406a38e2bf040129671b6c27ef65f5d_11\" attributename=\"x2\" attributetype=\"XML\" from=\"-1.0658141036401503e-14\" to=\"49.999999999999986\" dur=\" 0.268s\" fill=\"freeze\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_10.end\" from=\"-1.4210854715202004e-14\" to=\"-1.9643867237284715e-15\" dur=\" 0.268s\" fill=\"freeze\"></animate></line><line x1=\"49.999999999999986\" y1=\"-1.9643867237284715e-15\" x2=\"49.999999999999986\" y2=\"-1.9643867237284715e-15\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e406a38e2bf040129671b6c27ef65f5d_13\" attributename=\"x2\" attributetype=\"XML\" from=\"49.999999999999986\" to=\"24.999999999999964\" dur=\" 0.268s\" fill=\"freeze\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_12.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_12.end\" from=\"-1.9643867237284715e-15\" to=\"43.301270189221924\" dur=\" 0.268s\" fill=\"freeze\"></animate></line><line x1=\"24.999999999999964\" y1=\"43.301270189221924\" x2=\"24.999999999999964\" y2=\"43.301270189221924\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e406a38e2bf040129671b6c27ef65f5d_15\" attributename=\"x2\" attributetype=\"XML\" from=\"24.999999999999964\" to=\"74.99999999999997\" dur=\" 0.268s\" fill=\"freeze\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_14.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_14.end\" from=\"43.301270189221924\" to=\"43.30127018922194\" dur=\" 0.268s\" fill=\"freeze\"></animate></line><line x1=\"74.99999999999997\" y1=\"43.30127018922194\" x2=\"74.99999999999997\" y2=\"43.30127018922194\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e406a38e2bf040129671b6c27ef65f5d_17\" attributename=\"x2\" attributetype=\"XML\" from=\"74.99999999999997\" to=\"50.000000000000014\" dur=\" 0.268s\" fill=\"freeze\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_16.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_16.end\" from=\"43.30127018922194\" to=\"-2.1316282072803006e-14\" dur=\" 0.268s\" fill=\"freeze\"></animate></line><line x1=\"50.000000000000014\" y1=\"-2.1316282072803006e-14\" x2=\"50.000000000000014\" y2=\"-2.1316282072803006e-14\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e406a38e2bf040129671b6c27ef65f5d_19\" attributename=\"x2\" attributetype=\"XML\" from=\"50.000000000000014\" to=\"25.00000000000002\" dur=\" 0.268s\" fill=\"freeze\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_18.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_18.end\" from=\"-2.1316282072803006e-14\" to=\"43.30127018922192\" dur=\" 0.268s\" fill=\"freeze\"></animate></line><line x1=\"25.00000000000002\" y1=\"43.30127018922192\" x2=\"25.00000000000002\" y2=\"43.30127018922192\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e406a38e2bf040129671b6c27ef65f5d_21\" attributename=\"x2\" attributetype=\"XML\" from=\"25.00000000000002\" to=\"6.039613253960852e-14\" dur=\" 0.268s\" fill=\"freeze\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_20.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_20.end\" from=\"43.30127018922192\" to=\"-4.263256414560601e-14\" dur=\" 0.268s\" fill=\"freeze\"></animate></line><line x1=\"6.039613253960852e-14\" y1=\"-4.263256414560601e-14\" x2=\"6.039613253960852e-14\" y2=\"-4.263256414560601e-14\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e406a38e2bf040129671b6c27ef65f5d_23\" attributename=\"x2\" attributetype=\"XML\" from=\"6.039613253960852e-14\" to=\"-24.999999999999932\" dur=\" 0.268s\" fill=\"freeze\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_22.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_22.end\" from=\"-4.263256414560601e-14\" to=\"43.301270189221896\" dur=\" 0.268s\" fill=\"freeze\"></animate></line><line x1=\"-24.999999999999932\" y1=\"43.301270189221896\" x2=\"-24.999999999999932\" y2=\"43.301270189221896\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e406a38e2bf040129671b6c27ef65f5d_25\" attributename=\"x2\" attributetype=\"XML\" from=\"-24.999999999999932\" to=\"25.000000000000068\" dur=\" 0.268s\" fill=\"freeze\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_24.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_24.end\" from=\"43.301270189221896\" to=\"43.30127018922192\" dur=\" 0.268s\" fill=\"freeze\"></animate></line><line x1=\"25.000000000000068\" y1=\"43.30127018922192\" x2=\"25.000000000000068\" y2=\"43.30127018922192\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_e406a38e2bf040129671b6c27ef65f5d_27\" attributename=\"x2\" attributetype=\"XML\" from=\"25.000000000000068\" to=\"3.907985046680551e-14\" dur=\" 0.268s\" fill=\"freeze\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_26.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_26.end\" from=\"43.30127018922192\" to=\"0\" dur=\" 0.268s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_e406a38e2bf040129671b6c27ef65f5d_1\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e406a38e2bf040129671b6c27ef65f5d_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e406a38e2bf040129671b6c27ef65f5d_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"50.0,-0.0\" dur=\" 0.268s\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e406a38e2bf040129671b6c27ef65f5d_6\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-210.0,0,0\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_5.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"50.0,-0.0\" to=\"25.00000000000001,-43.30127018922194\" dur=\" 0.268s\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e406a38e2bf040129671b6c27ef65f5d_8\" type=\"rotate\" from=\"-210.0,0,0\" to=\"-330.0,0,0\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_7.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"25.00000000000001,-43.30127018922194\" to=\"-1.0658141036401503e-14,-1.4210854715202004e-14\" dur=\" 0.268s\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_8.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e406a38e2bf040129671b6c27ef65f5d_10\" type=\"rotate\" from=\"-330.0,0,0\" to=\"-450.0,0,0\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_9.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-1.0658141036401503e-14,-1.4210854715202004e-14\" to=\"49.999999999999986,-1.9643867237284715e-15\" dur=\" 0.268s\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_10.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e406a38e2bf040129671b6c27ef65f5d_12\" type=\"rotate\" from=\"-450.0,0,0\" to=\"-330.0,0,0\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_11.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_12.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"49.999999999999986,-1.9643867237284715e-15\" to=\"24.999999999999964,43.301270189221924\" dur=\" 0.268s\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_12.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_13.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e406a38e2bf040129671b6c27ef65f5d_14\" type=\"rotate\" from=\"-330.0,0,0\" to=\"-450.0,0,0\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_13.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_14.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"24.999999999999964,43.301270189221924\" to=\"74.99999999999997,43.30127018922194\" dur=\" 0.268s\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_14.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_15.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e406a38e2bf040129671b6c27ef65f5d_16\" type=\"rotate\" from=\"-450.0,0,0\" to=\"-570.0,0,0\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_15.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_16.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"74.99999999999997,43.30127018922194\" to=\"50.000000000000014,-2.1316282072803006e-14\" dur=\" 0.268s\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_16.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_17.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e406a38e2bf040129671b6c27ef65f5d_18\" type=\"rotate\" from=\"-570.0,0,0\" to=\"-690.0,0,0\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_17.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_18.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"50.000000000000014,-2.1316282072803006e-14\" to=\"25.00000000000002,43.30127018922192\" dur=\" 0.268s\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_18.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_19.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e406a38e2bf040129671b6c27ef65f5d_20\" type=\"rotate\" from=\"-690.0,0,0\" to=\"-570.0,0,0\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_19.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_20.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"25.00000000000002,43.30127018922192\" to=\"6.039613253960852e-14,-4.263256414560601e-14\" dur=\" 0.268s\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_20.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_21.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e406a38e2bf040129671b6c27ef65f5d_22\" type=\"rotate\" from=\"-570.0,0,0\" to=\"-690.0,0,0\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_21.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_22.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"6.039613253960852e-14,-4.263256414560601e-14\" to=\"-24.999999999999932,43.301270189221896\" dur=\" 0.268s\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_22.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_23.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e406a38e2bf040129671b6c27ef65f5d_24\" type=\"rotate\" from=\"-690.0,0,0\" to=\"-810.0,0,0\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_23.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_24.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-24.999999999999932,43.301270189221896\" to=\"25.000000000000068,43.30127018922192\" dur=\" 0.268s\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_24.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_25.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e406a38e2bf040129671b6c27ef65f5d_26\" type=\"rotate\" from=\"-810.0,0,0\" to=\"-930.0,0,0\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_25.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_26.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"25.000000000000068,43.30127018922192\" to=\"3.907985046680551e-14,-0.0\" dur=\" 0.268s\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_26.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_e406a38e2bf040129671b6c27ef65f5d_27.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_e406a38e2bf040129671b6c27ef65f5d_28\" type=\"rotate\" from=\"-930.0,0,0\" to=\"-810.0,0,0\" begin=\"af_e406a38e2bf040129671b6c27ef65f5d_27.end\" dur=\" 0.111s\" fill=\"freeze\"></animateTransform></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "from turtle import *\n\ndef triangle(l):\n for _ in range(3):\n forward(l)\n left(120)\n\n\n\nx = 50\nfor _ in range(3):\n triangle(x)\n forward(x)\n right(120)\n\ndone()" }, { + "cell_type": "code", + "execution_count": 7, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "# A corriger !!!\n\nfrom turtle import *\n\ndef triangle(l):\n for _ in range(3):\n forward(l)\n left(120)\n\ndef sierpinski(l, n):\n if n ==0:\n triangle(l)\n else:\n for _ in range(3):\n sierpinski(l/3, n-1)\n forward(l/3)\n right(120) \n\nspeed(10)\nsierpinski(200, 1)\n\n\ndone()", - "execution_count": 7, "outputs": [ { - "output_type": "display_data", "data": { "image/svg+xml": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"640\" height=\"480\" preserveaspectratio=\"xMidYMid meet\" viewbox=\"0 0 640 480\"><animate id=\"af_4a120c6550f842cd9a26f33bb02d4cac_0\" attributename=\"opacity\" attributetype=\"CSS\" from=\"1\" to=\"1\" begin=\"0s\" dur=\"1ms\" fill=\"freeze\"></animate><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4a120c6550f842cd9a26f33bb02d4cac_2\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_1.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_1.end\" from=\"0\" to=\"0\" dur=\"1ms\" fill=\"freeze\"></animate></line><line x1=\"0\" y1=\"0\" x2=\"0\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4a120c6550f842cd9a26f33bb02d4cac_5\" attributename=\"x2\" attributetype=\"XML\" from=\"0\" to=\"66.66666666666667\" dur=\" 0.084s\" fill=\"freeze\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_4.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_4.end\" from=\"0\" to=\"0\" dur=\" 0.084s\" fill=\"freeze\"></animate></line><line x1=\"66.66666666666667\" y1=\"0\" x2=\"66.66666666666667\" y2=\"0\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4a120c6550f842cd9a26f33bb02d4cac_7\" attributename=\"x2\" attributetype=\"XML\" from=\"66.66666666666667\" to=\"33.33333333333335\" dur=\" 0.084s\" fill=\"freeze\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_6.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_6.end\" from=\"0\" to=\"-57.73502691896258\" dur=\" 0.084s\" fill=\"freeze\"></animate></line><line x1=\"33.33333333333335\" y1=\"-57.73502691896258\" x2=\"33.33333333333335\" y2=\"-57.73502691896258\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4a120c6550f842cd9a26f33bb02d4cac_9\" attributename=\"x2\" attributetype=\"XML\" from=\"33.33333333333335\" to=\"-1.4210854715202004e-14\" dur=\" 0.084s\" fill=\"freeze\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_8.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_8.end\" from=\"-57.73502691896258\" to=\"-1.4210854715202004e-14\" dur=\" 0.084s\" fill=\"freeze\"></animate></line><line x1=\"-1.4210854715202004e-14\" y1=\"-1.4210854715202004e-14\" x2=\"-1.4210854715202004e-14\" y2=\"-1.4210854715202004e-14\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4a120c6550f842cd9a26f33bb02d4cac_11\" attributename=\"x2\" attributetype=\"XML\" from=\"-1.4210854715202004e-14\" to=\"66.66666666666666\" dur=\" 0.084s\" fill=\"freeze\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_10.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_10.end\" from=\"-1.4210854715202004e-14\" to=\"2.1177692734293746e-15\" dur=\" 0.084s\" fill=\"freeze\"></animate></line><line x1=\"66.66666666666666\" y1=\"2.1177692734293746e-15\" x2=\"66.66666666666666\" y2=\"2.1177692734293746e-15\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4a120c6550f842cd9a26f33bb02d4cac_13\" attributename=\"x2\" attributetype=\"XML\" from=\"66.66666666666666\" to=\"33.33333333333329\" dur=\" 0.084s\" fill=\"freeze\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_12.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_12.end\" from=\"2.1177692734293746e-15\" to=\"57.73502691896257\" dur=\" 0.084s\" fill=\"freeze\"></animate></line><line x1=\"33.33333333333329\" y1=\"57.73502691896257\" x2=\"33.33333333333329\" y2=\"57.73502691896257\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4a120c6550f842cd9a26f33bb02d4cac_15\" attributename=\"x2\" attributetype=\"XML\" from=\"33.33333333333329\" to=\"99.99999999999997\" dur=\" 0.084s\" fill=\"freeze\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_14.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_14.end\" from=\"57.73502691896257\" to=\"57.73502691896258\" dur=\" 0.084s\" fill=\"freeze\"></animate></line><line x1=\"99.99999999999997\" y1=\"57.73502691896258\" x2=\"99.99999999999997\" y2=\"57.73502691896258\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4a120c6550f842cd9a26f33bb02d4cac_17\" attributename=\"x2\" attributetype=\"XML\" from=\"99.99999999999997\" to=\"66.66666666666669\" dur=\" 0.084s\" fill=\"freeze\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_16.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_16.end\" from=\"57.73502691896258\" to=\"-3.552713678800501e-14\" dur=\" 0.084s\" fill=\"freeze\"></animate></line><line x1=\"66.66666666666669\" y1=\"-3.552713678800501e-14\" x2=\"66.66666666666669\" y2=\"-3.552713678800501e-14\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4a120c6550f842cd9a26f33bb02d4cac_19\" attributename=\"x2\" attributetype=\"XML\" from=\"66.66666666666669\" to=\"33.333333333333364\" dur=\" 0.084s\" fill=\"freeze\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_18.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_18.end\" from=\"-3.552713678800501e-14\" to=\"57.73502691896255\" dur=\" 0.084s\" fill=\"freeze\"></animate></line><line x1=\"33.333333333333364\" y1=\"57.73502691896255\" x2=\"33.333333333333364\" y2=\"57.73502691896255\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4a120c6550f842cd9a26f33bb02d4cac_21\" attributename=\"x2\" attributetype=\"XML\" from=\"33.333333333333364\" to=\"7.815970093361102e-14\" dur=\" 0.084s\" fill=\"freeze\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_20.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_20.end\" from=\"57.73502691896255\" to=\"-7.105427357601002e-14\" dur=\" 0.084s\" fill=\"freeze\"></animate></line><line x1=\"7.815970093361102e-14\" y1=\"-7.105427357601002e-14\" x2=\"7.815970093361102e-14\" y2=\"-7.105427357601002e-14\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4a120c6550f842cd9a26f33bb02d4cac_23\" attributename=\"x2\" attributetype=\"XML\" from=\"7.815970093361102e-14\" to=\"-33.33333333333324\" dur=\" 0.084s\" fill=\"freeze\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_22.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_22.end\" from=\"-7.105427357601002e-14\" to=\"57.73502691896251\" dur=\" 0.084s\" fill=\"freeze\"></animate></line><line x1=\"-33.33333333333324\" y1=\"57.73502691896251\" x2=\"-33.33333333333324\" y2=\"57.73502691896251\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4a120c6550f842cd9a26f33bb02d4cac_25\" attributename=\"x2\" attributetype=\"XML\" from=\"-33.33333333333324\" to=\"33.33333333333343\" dur=\" 0.084s\" fill=\"freeze\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_24.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_24.end\" from=\"57.73502691896251\" to=\"57.73502691896255\" dur=\" 0.084s\" fill=\"freeze\"></animate></line><line x1=\"33.33333333333343\" y1=\"57.73502691896255\" x2=\"33.33333333333343\" y2=\"57.73502691896255\" style=\"stroke: black;stroke-width: 1\"><animate id=\"af_4a120c6550f842cd9a26f33bb02d4cac_27\" attributename=\"x2\" attributetype=\"XML\" from=\"33.33333333333343\" to=\"5.684341886080802e-14\" dur=\" 0.084s\" fill=\"freeze\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_26.end\"></animate><animate attributename=\"y2\" attributetype=\"XML\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_26.end\" from=\"57.73502691896255\" to=\"-1.4210854715202004e-14\" dur=\" 0.084s\" fill=\"freeze\"></animate></line></g><g transform=\"translate(320 240)\"></g><g transform=\"translate(320 240)\"><polygon points=\"0,16 -2,14 -1,10 -4,7 -7,9 -9,8 -6,5 -7,1 -5,-3 -8,-6 -6,-8 -4,-5 0,-7 4,-5 6,-8 8,-6 5,-3 7,1 6,5 9,8 7,9 4,7 1,10 2,14\" stroke=\"black\" fill=\"black\" stroke-width=\"1\" opacity=\"0\"><animate id=\"af_4a120c6550f842cd9a26f33bb02d4cac_1\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_0.end\" dur=\"1ms\" fill=\"freeze\" attributename=\"opacity\" attributetype=\"XML\" from=\"0\" to=\"1\"></animate><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_2.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4a120c6550f842cd9a26f33bb02d4cac_3\" type=\"rotate\" from=\"0,0,0\" to=\"0.0,0,0\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_2.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_3.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4a120c6550f842cd9a26f33bb02d4cac_4\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-90.0,0,0\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_3.end\" dur=\"1ms\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_4.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"0.0,-0.0\" to=\"66.66666666666667,-0.0\" dur=\" 0.084s\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_4.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_5.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4a120c6550f842cd9a26f33bb02d4cac_6\" type=\"rotate\" from=\"-90.0,0,0\" to=\"-210.0,0,0\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_5.end\" dur=\" 0.033s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_6.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"66.66666666666667,-0.0\" to=\"33.33333333333335,-57.73502691896258\" dur=\" 0.084s\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_6.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_7.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4a120c6550f842cd9a26f33bb02d4cac_8\" type=\"rotate\" from=\"-210.0,0,0\" to=\"-330.0,0,0\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_7.end\" dur=\" 0.033s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_8.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"33.33333333333335,-57.73502691896258\" to=\"-1.4210854715202004e-14,-1.4210854715202004e-14\" dur=\" 0.084s\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_8.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_9.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4a120c6550f842cd9a26f33bb02d4cac_10\" type=\"rotate\" from=\"-330.0,0,0\" to=\"-450.0,0,0\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_9.end\" dur=\" 0.033s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_10.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-1.4210854715202004e-14,-1.4210854715202004e-14\" to=\"66.66666666666666,2.1177692734293746e-15\" dur=\" 0.084s\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_10.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_11.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4a120c6550f842cd9a26f33bb02d4cac_12\" type=\"rotate\" from=\"-450.0,0,0\" to=\"-330.0,0,0\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_11.end\" dur=\" 0.033s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_12.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"66.66666666666666,2.1177692734293746e-15\" to=\"33.33333333333329,57.73502691896257\" dur=\" 0.084s\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_12.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_13.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4a120c6550f842cd9a26f33bb02d4cac_14\" type=\"rotate\" from=\"-330.0,0,0\" to=\"-450.0,0,0\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_13.end\" dur=\" 0.033s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_14.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"33.33333333333329,57.73502691896257\" to=\"99.99999999999997,57.73502691896258\" dur=\" 0.084s\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_14.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_15.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4a120c6550f842cd9a26f33bb02d4cac_16\" type=\"rotate\" from=\"-450.0,0,0\" to=\"-570.0,0,0\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_15.end\" dur=\" 0.033s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_16.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"99.99999999999997,57.73502691896258\" to=\"66.66666666666669,-3.552713678800501e-14\" dur=\" 0.084s\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_16.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_17.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4a120c6550f842cd9a26f33bb02d4cac_18\" type=\"rotate\" from=\"-570.0,0,0\" to=\"-690.0,0,0\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_17.end\" dur=\" 0.033s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_18.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"66.66666666666669,-3.552713678800501e-14\" to=\"33.333333333333364,57.73502691896255\" dur=\" 0.084s\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_18.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_19.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4a120c6550f842cd9a26f33bb02d4cac_20\" type=\"rotate\" from=\"-690.0,0,0\" to=\"-570.0,0,0\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_19.end\" dur=\" 0.033s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_20.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"33.333333333333364,57.73502691896255\" to=\"7.815970093361102e-14,-7.105427357601002e-14\" dur=\" 0.084s\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_20.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_21.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4a120c6550f842cd9a26f33bb02d4cac_22\" type=\"rotate\" from=\"-570.0,0,0\" to=\"-690.0,0,0\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_21.end\" dur=\" 0.033s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_22.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"7.815970093361102e-14,-7.105427357601002e-14\" to=\"-33.33333333333324,57.73502691896251\" dur=\" 0.084s\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_22.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_23.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4a120c6550f842cd9a26f33bb02d4cac_24\" type=\"rotate\" from=\"-690.0,0,0\" to=\"-810.0,0,0\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_23.end\" dur=\" 0.033s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_24.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"-33.33333333333324,57.73502691896251\" to=\"33.33333333333343,57.73502691896255\" dur=\" 0.084s\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_24.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_25.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4a120c6550f842cd9a26f33bb02d4cac_26\" type=\"rotate\" from=\"-810.0,0,0\" to=\"-930.0,0,0\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_25.end\" dur=\" 0.033s\" fill=\"freeze\"></animateTransform><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_26.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateMotion from=\"33.33333333333343,57.73502691896255\" to=\"5.684341886080802e-14,-1.4210854715202004e-14\" dur=\" 0.084s\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_26.end\" fill=\"freeze\"></animateMotion><animateMotion begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_27.end\" dur=\"1ms\" fill=\"remove\"></animateMotion><animateTransform attributename=\"transform\" id=\"af_4a120c6550f842cd9a26f33bb02d4cac_28\" type=\"rotate\" from=\"-930.0,0,0\" to=\"-810.0,0,0\" begin=\"af_4a120c6550f842cd9a26f33bb02d4cac_27.end\" dur=\" 0.033s\" fill=\"freeze\"></animateTransform></polygon></g></svg>" }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } - ] + ], + "source": "# A corriger !!!\n\nfrom turtle import *\n\ndef triangle(l):\n for _ in range(3):\n forward(l)\n left(120)\n\ndef sierpinski(l, n):\n if n ==0:\n triangle(l)\n else:\n for _ in range(3):\n sierpinski(l/3, n-1)\n forward(l/3)\n right(120) \n\nspeed(10)\nsierpinski(200, 1)\n\n\ndone()" }, { + "cell_type": "markdown", "metadata": { "trusted": true }, - "cell_type": "markdown", "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 13 : Pingpong</h3>\n\nLa fonction `pingpong()` reprend le dessin de la leçon 1 et ajoute trois paramètres\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\ndef pingpong(d, c, c2):\n down()\n left(90)\n color(c) # poignée\n width(d/8)\n forward(d/2)\n color(c2) # plaque\n width(d/2)\n forward(d/10)\n up() # retourner au point de départ\n backward(6/10*d)\n right(90)\n\npingpong(200, 'brown', 'red')\nforward(100)\npingpong(150, 'brown', 'blue')\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef pingpong(d, c, c2):\n down()\n left(90)\n color(c) # poignée\n width(d/8)\n forward(d/2)\n color(c2) # plaque\n width(d/2)\n forward(d/10)\n up() # retourner au point de départ\n backward(6/10*d)\n right(90)\n\npingpong(200, 'brown', 'red')\nforward(100)\npingpong(150, 'brown', 'blue')\n\ndone()\n" } ], "metadata": { "kernelspec": { - "name": "python3", "display_name": "Python 3", - "language": "python" + "language": "python", + "name": "python3" } }, "nbformat": 4, diff --git a/Notebooks/Untitled(5).ipynb b/Notebooks/Untitled(5).ipynb index f37ae9a7ff45ce5256d414dc185d384664c128d7..0436225cc704570443eec4ddfdb92f345703687c 100644 --- a/Notebooks/Untitled(5).ipynb +++ b/Notebooks/Untitled(5).ipynb @@ -1 +1,531 @@ -{"cells":[{"metadata":{},"cell_type":"markdown","source":"<div style=\"padding:20px;background-color:papayawhip;\" > \n<h3 style=\"color:chocolate\"> <i class=\"fa fa-info\" aria-hidden=\"true\"> </i> Remarque introductive <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\" <i class=\"fa fa-folder\" aria-hidden=\"true\"> </i>\n</p> </div> "},{"metadata":{},"cell_type":"markdown","source":"# Questionner - `input()`\n\nDans ce chapitre, nous découvrons comment un programme peut poser une question lors de son exécution. L'utilisateur du programme peut alors répondre et entrer une information. La réponse sera stockée dans la mémoire de l'ordinateur et sera associée à une variable. Grâce à cette variable, le programme peut traiter la réponse fournie, et le résultat peut être affiché. Nous allons voir que :\n\n- la fonction `input('question')` demande une information,\n- une variable, par exemple `x`, mémorise une information,\n- la fonction `print()` affiche un texte (une réponse).\n\n"},{"metadata":{},"cell_type":"markdown","source":"## La fonction `input()`\n\nLa fonction `input('question')` permet de demander une entrée (input) à l'utilisateur.\nL'utilisateur voit le texte `question` affiché à la console et doit répondre à cette question. Il termine son entrée avec la touche Enter.\n\nLa réponse de l'utilisateur est ensuite mémorisée dans une variable que nous appelons `x` dans cet exemple.\nEnsuite, nous pouvons utiliser cette variable `x` dans la suite du programme, par exemple comme argument dans une fonction `print()`.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"x = input('Entrez votre nom: ')\nprint('Bonjour', x)\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## La fonction `print()`\n\nLa fonction `print()` peut accepter un ou plusieurs arguments, séparés par une virgule. Un espace est inséré à la place de la virgule.\nAppeler la fonction `print()` sans argument, insère une ligne vide.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"x = input('Entrez votre nom: ')\nprint() # sans argument - ligne vide\nprint('Hello') # un argument\nprint('Bonjour', x) # deux arguments\nprint(x, 'comment vas-tu?')\nprint(x, 'restera toujours', x) # trois arguments\nprint(x, 'voit', x, 'qui voit', x) # cinq arguments\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## La variable\n\nUne variable est une place en mémoire pour stocker de l'information.\nVous êtes complètement libres dans le choix des noms pour les variables, mais il est recommandé de choisir des noms qui sont le plus explicites possible. C'est mieux d'utiliser des noms de variable parlants, comme `nom` et `age`, même si on avait pu utiliser `x` et `y`. \n\n"},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 1 </h3>Ajoutez une troisième question et utilisez la réponse dans un `print()`.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"nom = input('Entrez votre nom: ')\nprint('Bonjour', nom)\n\nage = input('Entrez votre âge: ')\nprint('Très bien', nom, 'vous avez', age, 'ans')\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Demander un nombre\n\nLa fonction `input()` permet d'obtenir une entrée de l'utilisateur. Mais attention !\nLa valeur retournée est une chaine de caractères (de type string `str`). Nous pouvons le prouver avec la fonction `type()`.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"x = input('Entrez un nombre: ')\nprint(type(x))\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Pour pouvoir utiliser cette valeur dans un calcul, nous devons la transformer en nombre. Pour convertir une chaine de caractères en un nombre à virgule flottante nous utilisons la fonction de conversion `float()`.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"x = '1.5'\nprint(type(x)) # la variable x contient une chaîne\nprint(type(float(x))) # la fonction float(x) renvoie un nombre\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Opérations de base\n\nEn Python, nous retrouvons les 4 opérations arithmétiques de base :\n\n- addition (`+`)\n- soustraction (`-`)\n- multiplication (`*`)\n- division (`/`)\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('Opérations de base')\na = float(input('Entrez un nombre: '))\nb = float(input('Entrez un nombre: '))\nprint()\nprint('Addition ', a + b)\nprint('Soustraction ', a - b)\nprint('Multiplication', a * b)\nprint('Division ', a / b)\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Puissance\n\nEn Python l'opérateur de puissance est `**`. Ne le confondez pas avec le symbole `^` utilisé dans d'autres langages tel qu’Excel.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('Puissance')\na = float(input('Entrez un nombre: '))\nn = float(input('Entrez un exposant: '))\nprint()\nprint(a, 'puissance', n, '=', a ** n)\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Nous pouvons utiliser une puissance de 0.5 pour calculer une racine.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('Racine')\na = float(input('Entrez un nombre: '))\nprint('La racine de', a, 'est', a ** 0.5)\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Nous pouvons maintenant calculer une diagonale, en utilisant le théorème de Pythagore.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('Pythagore')\na = float(input('Entrez un nombre a: '))\nb = float(input('Entrez un nombre b: '))\nprint()\nprint('La diagonale est', (a ** 2 + b ** 2) ** 0.5)\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Division entière\n\nEn Python, nous avons un opérateur spécial pour la division entière (`//`) ainsi que pour le reste de la division entière. L'opérateur pour le reste de la division entière est `%` est s'appelle **modulo**.\n\nCette fois-ci nous transformons la chaine pas en nombre à virgule flottante (`float`), mais en nombre enter (`int`).\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('Division entière')\na = int(input('Entrez un entier a: '))\nb = int(input('Entrez un entier b: '))\nprint()\nprint('Division normale ', a / b)\nprint('Division entière ', a // b)\nprint('Reste de la division', a % b)\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\nQuel est le résultat de l'expression `10 % 3` ?\n\nA) 1\nB) 2\nC) 3\nD) 3.333333\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\"> \nRéponse\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">A) 1\n</div>\n</details>\n \n"},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\nEn informatique, `int` est l'abréviation pour\n\nA) international\nB) entier\nC) interne\nD) intelligent\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\"> \nRéponse\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">B) entier\n</div>\n</details>\n \n"},{"metadata":{},"cell_type":"markdown","source":"## Calcul géométrique\n\nDans l'exemple suivant, on demande le rayon et on affiche rayon, diamètre et circonférence. Ajoutez la surface du cercle en utilisant la formule :\n\n$$ S = \\pi r^2 $$\n\n"},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 2 </h3>Complétez le programme pour afficher la surface du cercle.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('Circle')\nr = float(input('Entrez le rayon: '))\npi = 3.14\nprint()\nprint('rayon =', r)\nprint('diamètre =', 2 * r)\nprint('circonférence =', pi * 2 * r)\nprint('surface =', ...)\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Nous pouvons également créer des programmes où nous demandons plusieurs valeurs à l'utilisateur. Cette fois, nous permettons seulement l'utilisation de nombres entiers, et donc transformons la chaine obtenue avec `int()` en nombre entier.\n\n"},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 3 </h3>Complétez le programme pour afficher le périmètre et la diagonale.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('Rectangle')\na = float(input('Entrez la largeur: '))\nb = float(input('Entrez la longueur: '))\n\nprint('surface =', a * b)\nprint('périmètre =', ...)\nprint('diagonale =', ...)\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Créer un quiz\n\nPour faire des petits quiz, nous créons des paires de mots qui vont ensemble. Par exemple pays et capitale dans un cours de géographie, ou une liste de vocabulaire en deux langues, pour un cours de langue.\n\n"},{"metadata":{},"cell_type":"markdown","source":"### Séquence de questions\n\nNous mettons les deux valeurs `question` et `solution` dans un tuple et nous regroupons ces paires dans un deuxième tuple que nous appelons `quiz`\n\nQuand nous parcourons `quiz` avec une boucle `for` nous pouvons utiliser une seule variable, par exemple `x` et lui affecter le tuple `(question, solution)`\n\nNous pouvons aussi parcourir le quiz avec un tuple de deux variables `(q, s)` et associer les deux valeurs séparément à chaque variable : donc\n`q = question` et `s = solution`.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"\nquiz = (('France', 'Paris'),\n ('Allemagne', 'Berlin'),\n ('Suisse', 'Berne'))\n\nprint('parcourir avec x')\nfor x in quiz:\n print('x =', x)\n\nprint()\nprint('parcourir avec (q, s)')\nfor (q, s) in quiz:\n print('q =', q, ' s =', s)\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Poser une question\n\nNous pouvons maintenant extraire la question et la poser plusieurs fois dans une boucle `for`. Avec `input()` nous demandons la réponse. Nous séparons les questions avec un `print()` sans argument pour insérer une ligne vide entre les questions.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"\nquiz = (('France', 'Paris'),\n ('Allemagne', 'Berlin'),\n ('Suisse', 'Berne'))\n\nfor (q, s) in quiz:\n print('Quelle est la capitale de', q)\n reponse = input('Votre réponse: ')\n print()\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Evaluer une réponse\n\nNous introduisons ici déjà la structure `if-else` que nous allons voir en détail plus tard.\n\nLe mot-clé `if` est suivi d'une condition. Ici nous comparons la réponse donnée par l'utilisateur avec la solution connue par le programme.\n\nL'expression `reponse == solution` renvoie comme valeur `True` ou `False`. Selon cette valeur, un des deux blocs est exécuté.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"\nquiz = (('France', 'Paris'),\n ('Allemagne', 'Berlin'),\n ('Suisse', 'Berne'))\n\nfor (question, solution) in quiz:\n print('Quelle est la capitale de', question)\n reponse = input('Votre réponse: ')\n if reponse == solution:\n print('correct')\n else:\n print('FAUX! La bonne réponse est', solution)\n print()\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Quiz avec score\n\nComment ajouter un score ?\n\nIl faut ajouter 3 éléments de code pour:\n\n- initialiser une variable au début\n- augmenter la valeur avec chaque bonne réponse\n- afficher le score à la fin\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"score = 0 # initialiser au début\n\nprint('avant', score)\nscore = score + 1\nprint('après', score)\n\nprint('Votre score est', score)\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Nous reprenons l'exemple du [chapitre précédent](prog1.randomiser) et nous ajoutons le calcul du score\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"score = 0\nquiz = (('France', 'Paris'),\n ('Allemagne', 'Berlin'),\n ('Suisse', 'Berne'))\n\nfor (question, solution) in quiz:\n print('Quelle est la capitale de', question)\n reponse = input('Votre réponse: ')\n if reponse == solution:\n print('correct')\n score = score + 1\n else:\n print('FAUX! La bonne réponse est', solution)\n print()\n\nprint('Votre score: ', score, 'sur', len(quiz))\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Quiz mathématique\n\nNous utilisons un tuple avec deux valeurs (a, b) que nous mettons dans un deuxième tuple.\nCette fois nous avons pas besoin de donner une solution, car nous pouvons la calculer.\n\n"},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 4 </h3>Ajoutez le score pour ce quiz.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('Quiz addition')\nquiz = ((12, 35), (23, 11), (55, 23))\n\nfor (a, b) in quiz:\n print(a, '+', b, '=')\n reponse = int(input())\n if reponse == a + b:\n print('correct')\n else:\n print('FAUX. La bonne réponse est', a + b)\n print()\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Erreurs\n\nDans des chapitres précédents, nous avons déjà vu quelques messages d'erreurs. Mais il y en a d'autres que nous allons voir ici.\nIl est important de bien comprendre les messages d'erreur.\nDans cette section, vous allez découvrir les différentes catégories d'erreur et comment les corriger.\n\n"},{"metadata":{},"cell_type":"markdown","source":"### SyntaxError - accents\n\nCette erreur survient lorsque vous utilisez des accents dans des noms de fonctions ou de variables.\n\n"},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 5 </h3>Corrigez les trois erreurs de syntaxe'.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"from turtle import *\n\ndef carré():\n for à in range(4):\n forward(100)\n left(90)\n\ncarré()\n\ndone()\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### SyntaxError - parenthèses\n\nCette erreur survient lorsque vous oubliez de fermer une parenthèse.\n\n"},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 6 </h3>Corrigez l'erreur de syntaxe.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"from turtle import *\n\nforward(100)\nleft(90)\nforward(100\n\ndone()\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### SyntaxError - ponctuation\n\nCette erreur survient lorsque vous oubliez un signe de ponctuation (parenthèse, virgule, apostrophe).\n\n"},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 7 </h3>Corrigez les trois erreurs de syntaxe.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('hello'\nprint(12 34)\nprint('bonjour)\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### TypeError\n\nCette erreur survient lorsque vous mettez des opérandes dont le type n'est pas approprié pour l'opérateur, par exemple une comparaison entre une chaîne et un entier.\n\n"},{"metadata":{},"cell_type":"markdown","source":"<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 8 </h3>Corrigez les trois erreurs de type.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('10' > 0)\nprint('10' * '10')\nprint('10' + 10)\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Exercices\n\n- Téléchargez l'exercice\n- Lancez un éditeur externe (tel que Thonny)\n- Depuis l'éditeur ouvrez le fichier téléchargé\n- Remplacez ... par votre code\n- Déposez vos exercices sur Moodle\n\n"},{"metadata":{},"cell_type":"markdown","source":"### Chatbot\n\nCréez un programme qui vous pose des questions\n\n- votre nom\n- votre âge\n- votre couleur préférée\n- votre groupe de musique préféré\n- votre classe\n- votre meilleur ami\n\nÀ chaque fois le chatbot mémorise votre réponse dans une variable qu'il utilise dans la phrase suivante.\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('Je suis un chatbot')\nprint('Quel est ton nom ?')\nnom = input()\nprint('Salut', nom)\n...\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Rectangle\n\nFaites un programme qui demande à l'utilisateur les côtés a et b d'un rectangle et calcule ensuite\n\nle périmètre\n\n$$ p = 2 (a+b) $$\n\nla surface\n\n$$ S = ab $$\n\net la diagonale\n\n$$ d = \\sqrt{a^2 + b^2} $$\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('Le rectangle')\n\na = float(input('Entrez la longueur a: '))\n...\n\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Cercle\n\nFaites un programme qui demande à l'utilisateur le rayon d'un cercle et calcule ensuite\n\nle diamètre\n\n$$ d = 2r $$\n\nla circonférence\n\n$$ c = 2 \\pi r $$\n\net la surface\n\n$$ S = \\pi r^2 $$\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('Le cercle')\n\nr = input('Entrez le rayon r: ')\n...\n\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Sphère\n\nFaites un programme qui demande à l'utilisateur le rayon d'une sphère et calcule ensuite\n\nle diamètre\n\n$$ d = 2r $$\n\nla surface\n\n$$ A = 4 \\pi r^2 $$\n\net le volume\n\n$$ V = \\frac{4 \\pi r^3}{3} $$\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('La sphère')\n\nr = input('Entrez le rayon r: ')\n...\n\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Quiz de multiplication\n\nCréez un quiz de multiplication.\n\n- Complétez pour avoir 10 questions\n- Corrigez les erreurs\n- Ajoutez le calcul du score\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('Quiz de multiplication')\nscore = 0\n\nfor (a, b) in ((4, 6), (5, 6)):\n print(a, '*', b, '=')\n reponse = int(input())\n if reponse == a * b:\n print('correct')\n else:\n print('FAUX. La bonne réponse est', a + b)\n print()\n\nprint('Votre score est')\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Quiz de vocabulaire\n\nCréez un quiz de vocabulaire français-anglais.\n\n- Complétez pour avoir 10 questions\n- Corrigez les erreurs\n- Ajoutez le calcul du score\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('Quiz de vocabulaire anglais')\nscore = 0\nquiz = (('ordinateur', 'computer'),\n ('clavier', 'keyboard'),\n ('souris', 'display'))\n\nfor (question, solution) in quiz:\n reponse = input(question + ': ')\n if reponse == solution:\n print('correct')\n else:\n print('FAUX. La bonne réponse est', question)\n print()\n\nprint('Votre score est')\n","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Quiz Kahoot\n\nLa plate-forme d'apprentissage ludique [Kahoot!](https://fr.wikipedia.org/wiki/Kahoot!) est utilisée comme technologie éducative dans les écoles et autres établissements d'enseignement.\n\nSes jeux d’apprentissage, *Kahoots*, sont des questionnaires à choix multiples qui permettent à plusieurs utilisateurs de jouer simultanément. Le site est accessible via un navigateur Web, mais aussi téléchargeable sur smartphone.\n\nCréez un quiz avec des questions sur un sujet de culture générale, dans le style des quiz sur le site Kahoot.\n\n- Complétez pour avoir 10 questions\n- Ajoutez le calcul du score\n\n"},{"metadata":{"trusted":false},"cell_type":"code","source":"print('Quiz Kahoot Disney')\nprint()\nscore = 0\n\nquiz = ((\"Quel est le nom du cowboy dans Toy Story\", 'Woody'),\n (\"Comment s'appelle le garçon dont le nez grandit quand il ment\", 'Pinocchio'),\n (\"Quel est le nom de la fée dans Peter Pan\", 'Tinkerbell'))\n\n\nfor (question, solution) in quiz:\n print(question + '?')\n reponse = input()\n if reponse == solution:\n ...\n else:\n ...\n print()\n\nprint('Votre score est', ...)","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"---\n\n#### Remarque générale\n\nCe document est une adaptation d'un ressource pédagogique tiré du catalogue modulo https://modulo-info.ch/. Il est sous license Creative Commons [BY-NC-SA](https://creativecommons.org/licenses/?lang=fr)\n\n\n "}],"metadata":{"kernelspec":{"display_name":"Python 3 (ipykernel)","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.10.12"}},"nbformat":4,"nbformat_minor":2} \ No newline at end of file +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": "<div style=\"padding:20px;background-color:papayawhip;\" > \n<h3 style=\"color:chocolate\"> <i class=\"fa fa-info\" aria-hidden=\"true\"> </i> Remarque introductive <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\" <i class=\"fa fa-folder\" aria-hidden=\"true\"> </i>\n</p> </div> " + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "# Questionner - `input()`\n\nDans ce chapitre, nous découvrons comment un programme peut poser une question lors de son exécution. L'utilisateur du programme peut alors répondre et entrer une information. La réponse sera stockée dans la mémoire de l'ordinateur et sera associée à une variable. Grâce à cette variable, le programme peut traiter la réponse fournie, et le résultat peut être affiché. Nous allons voir que :\n\n- la fonction `input('question')` demande une information,\n- une variable, par exemple `x`, mémorise une information,\n- la fonction `print()` affiche un texte (une réponse).\n\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "## La fonction `input()`\n\nLa fonction `input('question')` permet de demander une entrée (input) à l'utilisateur.\nL'utilisateur voit le texte `question` affiché à la console et doit répondre à cette question. Il termine son entrée avec la touche Enter.\n\nLa réponse de l'utilisateur est ensuite mémorisée dans une variable que nous appelons `x` dans cet exemple.\nEnsuite, nous pouvons utiliser cette variable `x` dans la suite du programme, par exemple comme argument dans une fonction `print()`.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "x = input('Entrez votre nom: ')\nprint('Bonjour', x)\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "## La fonction `print()`\n\nLa fonction `print()` peut accepter un ou plusieurs arguments, séparés par une virgule. Un espace est inséré à la place de la virgule.\nAppeler la fonction `print()` sans argument, insère une ligne vide.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "x = input('Entrez votre nom: ')\nprint() # sans argument - ligne vide\nprint('Hello') # un argument\nprint('Bonjour', x) # deux arguments\nprint(x, 'comment vas-tu?')\nprint(x, 'restera toujours', x) # trois arguments\nprint(x, 'voit', x, 'qui voit', x) # cinq arguments\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "## La variable\n\nUne variable est une place en mémoire pour stocker de l'information.\nVous êtes complètement libres dans le choix des noms pour les variables, mais il est recommandé de choisir des noms qui sont le plus explicites possible. C'est mieux d'utiliser des noms de variable parlants, comme `nom` et `age`, même si on avait pu utiliser `x` et `y`. \n\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 1 </h3>Ajoutez une troisième question et utilisez la réponse dans un `print()`.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "nom = input('Entrez votre nom: ')\nprint('Bonjour', nom)\n\nage = input('Entrez votre âge: ')\nprint('Très bien', nom, 'vous avez', age, 'ans')\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "## Demander un nombre\n\nLa fonction `input()` permet d'obtenir une entrée de l'utilisateur. Mais attention !\nLa valeur retournée est une chaine de caractères (de type string `str`). Nous pouvons le prouver avec la fonction `type()`.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "x = input('Entrez un nombre: ')\nprint(type(x))\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "Pour pouvoir utiliser cette valeur dans un calcul, nous devons la transformer en nombre. Pour convertir une chaine de caractères en un nombre à virgule flottante nous utilisons la fonction de conversion `float()`.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "x = '1.5'\nprint(type(x)) # la variable x contient une chaîne\nprint(type(float(x))) # la fonction float(x) renvoie un nombre\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "## Opérations de base\n\nEn Python, nous retrouvons les 4 opérations arithmétiques de base :\n\n- addition (`+`)\n- soustraction (`-`)\n- multiplication (`*`)\n- division (`/`)\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('Opérations de base')\na = float(input('Entrez un nombre: '))\nb = float(input('Entrez un nombre: '))\nprint()\nprint('Addition ', a + b)\nprint('Soustraction ', a - b)\nprint('Multiplication', a * b)\nprint('Division ', a / b)\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "## Puissance\n\nEn Python l'opérateur de puissance est `**`. Ne le confondez pas avec le symbole `^` utilisé dans d'autres langages tel qu’Excel.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('Puissance')\na = float(input('Entrez un nombre: '))\nn = float(input('Entrez un exposant: '))\nprint()\nprint(a, 'puissance', n, '=', a ** n)\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "Nous pouvons utiliser une puissance de 0.5 pour calculer une racine.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('Racine')\na = float(input('Entrez un nombre: '))\nprint('La racine de', a, 'est', a ** 0.5)\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "Nous pouvons maintenant calculer une diagonale, en utilisant le théorème de Pythagore.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('Pythagore')\na = float(input('Entrez un nombre a: '))\nb = float(input('Entrez un nombre b: '))\nprint()\nprint('La diagonale est', (a ** 2 + b ** 2) ** 0.5)\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "## Division entière\n\nEn Python, nous avons un opérateur spécial pour la division entière (`//`) ainsi que pour le reste de la division entière. L'opérateur pour le reste de la division entière est `%` est s'appelle **modulo**.\n\nCette fois-ci nous transformons la chaine pas en nombre à virgule flottante (`float`), mais en nombre enter (`int`).\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('Division entière')\na = int(input('Entrez un entier a: '))\nb = int(input('Entrez un entier b: '))\nprint()\nprint('Division normale ', a / b)\nprint('Division entière ', a // b)\nprint('Reste de la division', a % b)\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\nQuel est le résultat de l'expression `10 % 3` ?\n\nA) 1\nB) 2\nC) 3\nD) 3.333333\n```" + }, + { + "cell_type": "raw", + "metadata": {}, + "source": "Ma réponse : " + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">A) 1\n</div>\n</details>\n \n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "<h3 style=\"color:chocolate;background-color:papayawhip;\" > <i class=\"fa fa-question\" aria-hidden=\"true\"> </i> Quizz </h3> \n \n```\nEn informatique, `int` est l'abréviation pour\n\nA) international\nB) entier\nC) interne\nD) intelligent\n```" + }, + { + "cell_type": "raw", + "metadata": {}, + "source": "Ma réponse : " + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "<details>\n<summary style=\"border-left:3px solid #3c763d; border-radius:2pt; width:100%; color:#3c763d; padding:6px; background-color: #dff0d8\"> \nRéponse\n</summary> \n\n<div style=\"border-left:3px solid #3c763d; border-radius:2pt; color:#3c763d; padding:6px; background-color: #eff0e8\">B) entier\n</div>\n</details>\n \n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "## Calcul géométrique\n\nDans l'exemple suivant, on demande le rayon et on affiche rayon, diamètre et circonférence. Ajoutez la surface du cercle en utilisant la formule :\n\n$$ S = \\pi r^2 $$\n\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 2 </h3>Complétez le programme pour afficher la surface du cercle.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('Circle')\nr = float(input('Entrez le rayon: '))\npi = 3.14\nprint()\nprint('rayon =', r)\nprint('diamètre =', 2 * r)\nprint('circonférence =', pi * 2 * r)\nprint('surface =', ...)\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "Nous pouvons également créer des programmes où nous demandons plusieurs valeurs à l'utilisateur. Cette fois, nous permettons seulement l'utilisation de nombres entiers, et donc transformons la chaine obtenue avec `int()` en nombre entier.\n\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 3 </h3>Complétez le programme pour afficher le périmètre et la diagonale.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('Rectangle')\na = float(input('Entrez la largeur: '))\nb = float(input('Entrez la longueur: '))\n\nprint('surface =', a * b)\nprint('périmètre =', ...)\nprint('diagonale =', ...)\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "## Créer un quiz\n\nPour faire des petits quiz, nous créons des paires de mots qui vont ensemble. Par exemple pays et capitale dans un cours de géographie, ou une liste de vocabulaire en deux langues, pour un cours de langue.\n\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "### Séquence de questions\n\nNous mettons les deux valeurs `question` et `solution` dans un tuple et nous regroupons ces paires dans un deuxième tuple que nous appelons `quiz`\n\nQuand nous parcourons `quiz` avec une boucle `for` nous pouvons utiliser une seule variable, par exemple `x` et lui affecter le tuple `(question, solution)`\n\nNous pouvons aussi parcourir le quiz avec un tuple de deux variables `(q, s)` et associer les deux valeurs séparément à chaque variable : donc\n`q = question` et `s = solution`.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "\nquiz = (('France', 'Paris'),\n ('Allemagne', 'Berlin'),\n ('Suisse', 'Berne'))\n\nprint('parcourir avec x')\nfor x in quiz:\n print('x =', x)\n\nprint()\nprint('parcourir avec (q, s)')\nfor (q, s) in quiz:\n print('q =', q, ' s =', s)\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "### Poser une question\n\nNous pouvons maintenant extraire la question et la poser plusieurs fois dans une boucle `for`. Avec `input()` nous demandons la réponse. Nous séparons les questions avec un `print()` sans argument pour insérer une ligne vide entre les questions.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "\nquiz = (('France', 'Paris'),\n ('Allemagne', 'Berlin'),\n ('Suisse', 'Berne'))\n\nfor (q, s) in quiz:\n print('Quelle est la capitale de', q)\n reponse = input('Votre réponse: ')\n print()\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "### Evaluer une réponse\n\nNous introduisons ici déjà la structure `if-else` que nous allons voir en détail plus tard.\n\nLe mot-clé `if` est suivi d'une condition. Ici nous comparons la réponse donnée par l'utilisateur avec la solution connue par le programme.\n\nL'expression `reponse == solution` renvoie comme valeur `True` ou `False`. Selon cette valeur, un des deux blocs est exécuté.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "\nquiz = (('France', 'Paris'),\n ('Allemagne', 'Berlin'),\n ('Suisse', 'Berne'))\n\nfor (question, solution) in quiz:\n print('Quelle est la capitale de', question)\n reponse = input('Votre réponse: ')\n if reponse == solution:\n print('correct')\n else:\n print('FAUX! La bonne réponse est', solution)\n print()\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "### Quiz avec score\n\nComment ajouter un score ?\n\nIl faut ajouter 3 éléments de code pour:\n\n- initialiser une variable au début\n- augmenter la valeur avec chaque bonne réponse\n- afficher le score à la fin\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "score = 0 # initialiser au début\n\nprint('avant', score)\nscore = score + 1\nprint('après', score)\n\nprint('Votre score est', score)\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "Nous reprenons l'exemple du [chapitre précédent](prog1.randomiser) et nous ajoutons le calcul du score\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "score = 0\nquiz = (('France', 'Paris'),\n ('Allemagne', 'Berlin'),\n ('Suisse', 'Berne'))\n\nfor (question, solution) in quiz:\n print('Quelle est la capitale de', question)\n reponse = input('Votre réponse: ')\n if reponse == solution:\n print('correct')\n score = score + 1\n else:\n print('FAUX! La bonne réponse est', solution)\n print()\n\nprint('Votre score: ', score, 'sur', len(quiz))\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "### Quiz mathématique\n\nNous utilisons un tuple avec deux valeurs (a, b) que nous mettons dans un deuxième tuple.\nCette fois nous avons pas besoin de donner une solution, car nous pouvons la calculer.\n\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 4 </h3>Ajoutez le score pour ce quiz.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('Quiz addition')\nquiz = ((12, 35), (23, 11), (55, 23))\n\nfor (a, b) in quiz:\n print(a, '+', b, '=')\n reponse = int(input())\n if reponse == a + b:\n print('correct')\n else:\n print('FAUX. La bonne réponse est', a + b)\n print()\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "## Erreurs\n\nDans des chapitres précédents, nous avons déjà vu quelques messages d'erreurs. Mais il y en a d'autres que nous allons voir ici.\nIl est important de bien comprendre les messages d'erreur.\nDans cette section, vous allez découvrir les différentes catégories d'erreur et comment les corriger.\n\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "### SyntaxError - accents\n\nCette erreur survient lorsque vous utilisez des accents dans des noms de fonctions ou de variables.\n\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 5 </h3>Corrigez les trois erreurs de syntaxe'.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "from turtle import *\n\ndef carré():\n for à in range(4):\n forward(100)\n left(90)\n\ncarré()\n\ndone()\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "### SyntaxError - parenthèses\n\nCette erreur survient lorsque vous oubliez de fermer une parenthèse.\n\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 6 </h3>Corrigez l'erreur de syntaxe.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "from turtle import *\n\nforward(100)\nleft(90)\nforward(100\n\ndone()\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "### SyntaxError - ponctuation\n\nCette erreur survient lorsque vous oubliez un signe de ponctuation (parenthèse, virgule, apostrophe).\n\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 7 </h3>Corrigez les trois erreurs de syntaxe.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('hello'\nprint(12 34)\nprint('bonjour)\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "### TypeError\n\nCette erreur survient lorsque vous mettez des opérandes dont le type n'est pas approprié pour l'opérateur, par exemple une comparaison entre une chaîne et un entier.\n\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 8 </h3>Corrigez les trois erreurs de type.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('10' > 0)\nprint('10' * '10')\nprint('10' + 10)\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "## Exercices\n\n- Téléchargez l'exercice\n- Lancez un éditeur externe (tel que Thonny)\n- Depuis l'éditeur ouvrez le fichier téléchargé\n- Remplacez ... par votre code\n- Déposez vos exercices sur Moodle\n\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "### Chatbot\n\nCréez un programme qui vous pose des questions\n\n- votre nom\n- votre âge\n- votre couleur préférée\n- votre groupe de musique préféré\n- votre classe\n- votre meilleur ami\n\nÀ chaque fois le chatbot mémorise votre réponse dans une variable qu'il utilise dans la phrase suivante.\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('Je suis un chatbot')\nprint('Quel est ton nom ?')\nnom = input()\nprint('Salut', nom)\n...\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "### Rectangle\n\nFaites un programme qui demande à l'utilisateur les côtés a et b d'un rectangle et calcule ensuite\n\nle périmètre\n\n$$ p = 2 (a+b) $$\n\nla surface\n\n$$ S = ab $$\n\net la diagonale\n\n$$ d = \\sqrt{a^2 + b^2} $$\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('Le rectangle')\n\na = float(input('Entrez la longueur a: '))\n...\n\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "### Cercle\n\nFaites un programme qui demande à l'utilisateur le rayon d'un cercle et calcule ensuite\n\nle diamètre\n\n$$ d = 2r $$\n\nla circonférence\n\n$$ c = 2 \\pi r $$\n\net la surface\n\n$$ S = \\pi r^2 $$\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('Le cercle')\n\nr = input('Entrez le rayon r: ')\n...\n\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "### Sphère\n\nFaites un programme qui demande à l'utilisateur le rayon d'une sphère et calcule ensuite\n\nle diamètre\n\n$$ d = 2r $$\n\nla surface\n\n$$ A = 4 \\pi r^2 $$\n\net le volume\n\n$$ V = \\frac{4 \\pi r^3}{3} $$\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('La sphère')\n\nr = input('Entrez le rayon r: ')\n...\n\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "### Quiz de multiplication\n\nCréez un quiz de multiplication.\n\n- Complétez pour avoir 10 questions\n- Corrigez les erreurs\n- Ajoutez le calcul du score\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('Quiz de multiplication')\nscore = 0\n\nfor (a, b) in ((4, 6), (5, 6)):\n print(a, '*', b, '=')\n reponse = int(input())\n if reponse == a * b:\n print('correct')\n else:\n print('FAUX. La bonne réponse est', a + b)\n print()\n\nprint('Votre score est')\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "### Quiz de vocabulaire\n\nCréez un quiz de vocabulaire français-anglais.\n\n- Complétez pour avoir 10 questions\n- Corrigez les erreurs\n- Ajoutez le calcul du score\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('Quiz de vocabulaire anglais')\nscore = 0\nquiz = (('ordinateur', 'computer'),\n ('clavier', 'keyboard'),\n ('souris', 'display'))\n\nfor (question, solution) in quiz:\n reponse = input(question + ': ')\n if reponse == solution:\n print('correct')\n else:\n print('FAUX. La bonne réponse est', question)\n print()\n\nprint('Votre score est')\n" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "### Quiz Kahoot\n\nLa plate-forme d'apprentissage ludique [Kahoot!](https://fr.wikipedia.org/wiki/Kahoot!) est utilisée comme technologie éducative dans les écoles et autres établissements d'enseignement.\n\nSes jeux d’apprentissage, *Kahoots*, sont des questionnaires à choix multiples qui permettent à plusieurs utilisateurs de jouer simultanément. Le site est accessible via un navigateur Web, mais aussi téléchargeable sur smartphone.\n\nCréez un quiz avec des questions sur un sujet de culture générale, dans le style des quiz sur le site Kahoot.\n\n- Complétez pour avoir 10 questions\n- Ajoutez le calcul du score\n\n" + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "trusted": false + }, + "outputs": [], + "source": "print('Quiz Kahoot Disney')\nprint()\nscore = 0\n\nquiz = ((\"Quel est le nom du cowboy dans Toy Story\", 'Woody'),\n (\"Comment s'appelle le garçon dont le nez grandit quand il ment\", 'Pinocchio'),\n (\"Quel est le nom de la fée dans Peter Pan\", 'Tinkerbell'))\n\n\nfor (question, solution) in quiz:\n print(question + '?')\n reponse = input()\n if reponse == solution:\n ...\n else:\n ...\n print()\n\nprint('Votre score est', ...)" + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": "---\n\n#### Remarque générale\n\nCe document est une adaptation d'un ressource pédagogique tiré du catalogue modulo https://modulo-info.ch/. Il est sous license Creative Commons [BY-NC-SA](https://creativecommons.org/licenses/?lang=fr)\n\n\n " + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.12" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/Notebooks/revision_S1.ipynb b/Notebooks/revision_S1.ipynb index 0bab45cef93df9d07d5c7557aa174cc1a6775436..e0ec3dad2b85ac79a54a882626e9223a6df6a407 100644 --- a/Notebooks/revision_S1.ipynb +++ b/Notebooks/revision_S1.ipynb @@ -1,128 +1,128 @@ { "cells": [ { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-danger\"> \n \nAttention: **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\nPour reprendre votre travail, il suffit d'ouvrir le fichier .ipynb en cliquant sur *Fichier ouvrir*\n</div>\n\n\n# Exercices de révision pour l'évaluation" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 0 </h3>\n\nEcrire un programme qui affiche `Dans une images codé en 24 bit il y a 2**24 couleurs` où à la place de `2**24` il y a le résultat du calcul (c'est-à-dire le résultat de $2^{24}$) . " }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 1 </h3>\n\n1. Testez le programme suivant:" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(3):\n right(120)\n forward(100)\n for _ in range(5):\n forward(10)\n backward(10)\n left(72)\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(3):\n right(120)\n forward(100)\n for _ in range(5):\n forward(10)\n backward(10)\n left(72)\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "2. Réécrire le programme en définissant et en utilisant une fonction nommée `étoile`. Le programme doit produire la même figure\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\ndef # a compléter \n\n# a compléter \ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef # a compléter \n\n# a compléter \ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 2 </h3>\n\nReprendre votre programme dessinant un carré et un triangle (leçon 3 : les fonctions simples) et réaliser le programme qui dessine 5 fois le carré et le triangle comme sur la figure ci-dessous. Le code ne devrait pas dépasser 20 lignes.\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\ndef # a compléter \n\ndef # a compléter \n\n# a compléter \ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef # a compléter \n\ndef # a compléter \n\n# a compléter \ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 3 </h3>\n\nOn souhaite représenter la figure ci-dessous, mais le programme proposé ne donne pas la bonne exécution. \n- Quelle figure produit le code proposé (faire un croquis)?\n- Réécrire le code de sorte à obtenir la figure attendue.\nPrendre garde à la position finale de la tortue. Le point indique l’origine du repère.\n\n**Programme proposé**\n```Python\nfrom turtle import *\n\nfor _ in range(3):\n for _ in range(3):\n forward(50)\n left(120)\n forward(-50)\n right(120)\n\ndone()\n```\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(3):\n for _ in range(3):\n forward(50)\n left(120)\n forward(-50)\n right(120)\n\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(3):\n for _ in range(3):\n forward(50)\n left(120)\n forward(-50)\n right(120)\n\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 4 </h3>\n\nÉcrire un programme qui permet de produire le résultat ci-dessous dans la console à l’aide de trois boucles for imbriquées. On prendra garde à respecter les sauts de ligne. \n\n```\nmatin\nmidi soir soir soir \nmidi soir soir soir \n\nmatin\nmidi soir soir soir \nmidi soir soir soir \n```" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "# à compléter...", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "# à compléter..." }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 5 </h3>\n\nEn vous inspirant du programme ci-dessous\n\n```Python\nfrom turtle import *\n\nfor _ in range(3):\n right(120)\n forward(100)\n for _ in range(4):\n forward(10)\n backward(10)\n left(90)\n goto(0,0)\ndone()\n\n```\nécrire un programme qui dessine la figure suivante, une fleur de pissenlit très simplifiée. \n\n\n\nLe point indique l’origine du repère. La tige a une longueur de 150, les branches ont une longueur de 50 et la longueur des “graines” est de 10.\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(3):\n right(120)\n forward(100)\n for _ in range(4):\n forward(10)\n backward(10)\n left(90)\n goto(0,0)\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(3):\n right(120)\n forward(100)\n for _ in range(4):\n forward(10)\n backward(10)\n left(90)\n goto(0,0)\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 6 </h3>\n\nÉcrire un programme qui définit et utilise des fonctions afin de dessiner la figure suivante:\n\n\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": false }, - "cell_type": "code", - "source": "", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "" } ], "metadata": { "kernelspec": { - "name": "python3", "display_name": "Python 3", - "language": "python" + "language": "python", + "name": "python3" } }, "nbformat": 4, diff --git a/Notebooks/revision_S1_corrige.ipynb b/Notebooks/revision_S1_corrige.ipynb index 520692ea2170c89d6e6a5d913b8b68233153ea62..a074222b28e118272e4b641c917118b1db3afd00 100644 --- a/Notebooks/revision_S1_corrige.ipynb +++ b/Notebooks/revision_S1_corrige.ipynb @@ -1,146 +1,146 @@ { "cells": [ { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<div class = \"alert alert-danger\"> \n \n# Cours avec solution\n</div>\n\n<div class = \"alert alert-block alert-warning\"> \n\n### A faire avant de commençer\n**Cliquez sur Exécuter tout** dans le menu **Cellule**.\n</div>\n\n\n# Solutions des exercices de révision pour l'évaluation\n\n<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 0 </h3>\n\nEcrire un programme qui affiche `Dans une images codé en 24 bit il y a 2**24 couleurs` où à la place de `2**24` il y a le résultat du calcul (c'est-à-dire le résultat de $2^{24}$) . \n\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "print(\"Dans une images codé en 24 bit il y a \" ,2**24, \" couleurs\")", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "print(\"Dans une images codé en 24 bit il y a \" ,2**24, \" couleurs\")" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 1 </h3>\n\n1. Testez le programme suivant:" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(3):\n right(120)\n forward(100)\n for _ in range(5):\n forward(10)\n backward(10)\n left(72)\ndone()", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(3):\n right(120)\n forward(100)\n for _ in range(5):\n forward(10)\n backward(10)\n left(72)\ndone()" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "2. Réécrire le programme en définissant et en utilisant une fonction nommée `étoile`. Le programme doit produire la même figure\n\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef etoile():\n for _ in range(5):\n forward(10)\n backward(10)\n left(72)\n\nfor _ in range(3):\n right(120)\n forward(100)\n etoile()\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef etoile():\n for _ in range(5):\n forward(10)\n backward(10)\n left(72)\n\nfor _ in range(3):\n right(120)\n forward(100)\n etoile()\n\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 2 </h3>\n\nReprendre votre programme dessinant un carré et un triangle (leçon 3 : les fonctions simples) et réaliser le programme qui dessine 5 fois le carré et le triangle comme sur la figure ci-dessous. Le code ne devrait pas dépasser 20 lignes.\n\n\n\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef triangle():\n for _ in range(3):\n left(120)\n forward(30)\n \ndef carre():\n for _ in range(4):\n left(90)\n forward(30)\n\nup()\nbackward(200)\ndown()\n\nfor _ in range(5):\n carre()\n penup()\n forward(40)\n pendown()\n triangle()\n penup()\n forward(40)\n pendown()\n \ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef triangle():\n for _ in range(3):\n left(120)\n forward(30)\n \ndef carre():\n for _ in range(4):\n left(90)\n forward(30)\n\nup()\nbackward(200)\ndown()\n\nfor _ in range(5):\n carre()\n penup()\n forward(40)\n pendown()\n triangle()\n penup()\n forward(40)\n pendown()\n \ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 3 </h3>\n\nOn souhaite représenter la figure ci-dessous, mais le programme proposé ne donne pas la bonne exécution. \n- Quelle figure produit le code proposé (faire un croquis)?\n- Réécrire le code de sorte à obtenir la figure attendue.\nPrendre garde à la position finale de la tortue. Le point indique l’origine du repère.\n\n**Programme proposé**\n```Python\nfrom turtle import *\n\nfor _ in range(3):\n for _ in range(3):\n forward(50)\n left(120)\n forward(-50)\n right(120)\n\ndone()\n```\n\n\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nfor _ in range(3):\n for _ in range(3):\n forward(50)\n right(120)\n forward(50)\n left(120)\n\n \ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nfor _ in range(3):\n for _ in range(3):\n forward(50)\n right(120)\n forward(50)\n left(120)\n\n \ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 4 </h3>\n\nÉcrire un programme qui permet de produire le résultat ci-dessous dans la console à l’aide de trois boucles for imbriquées. On prendra garde à respecter les sauts de ligne. \n\n```\nmatin\nmidi soir soir soir \nmidi soir soir soir \n\nmatin\nmidi soir soir soir \nmidi soir soir soir \n```\n\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "for _ in range(2):\n print(\"matin\")\n for _ in range(2):\n print(\"midi\", end=\" \")\n for _ in range(3):\n print(\"soir\", end=\" \")\n print()\n print()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "for _ in range(2):\n print(\"matin\")\n for _ in range(2):\n print(\"midi\", end=\" \")\n for _ in range(3):\n print(\"soir\", end=\" \")\n print()\n print()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 5 </h3>\n\nEn vous inspirant du programme ci-dessous\n\n```Python\nfrom turtle import *\n\nfor _ in range(3):\n right(120)\n forward(100)\n for _ in range(4):\n forward(10)\n backward(10)\n left(90)\n goto(0,0)\ndone()\n\n```\nécrire un programme qui dessine la figure suivante, une fleur de pissenlit très simplifiée. \n\n\n\nLe point indique l’origine du repère. La tige a une longueur de 150, les branches ont une longueur de 50 et la longueur des “graines” est de 10.\n\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\nleft(90)\nbackward(180)\nforward(200)\n\nfor _ in range(5):\n forward(100)\n for _ in range(5):\n forward(10)\n backward(10)\n left(72)\n backward(100)\n right(72)\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\nleft(90)\nbackward(180)\nforward(200)\n\nfor _ in range(5):\n forward(100)\n for _ in range(5):\n forward(10)\n backward(10)\n left(72)\n backward(100)\n right(72)\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "### ou avec un fonction `etoile`" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef etoile():\n for _ in range(5):\n forward(10)\n backward(10)\n left(72) \n\nleft(90)\nbackward(180)\nforward(200)\n\nfor _ in range(5):\n forward(100)\n etoile()\n backward(100)\n right(72)\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef etoile():\n for _ in range(5):\n forward(10)\n backward(10)\n left(72) \n\nleft(90)\nbackward(180)\nforward(200)\n\nfor _ in range(5):\n forward(100)\n etoile()\n backward(100)\n right(72)\ndone()\n" }, { - "metadata": {}, "cell_type": "markdown", + "metadata": {}, "source": "<h3 style=\"color:teal;background-color:azure;\" > <i class=\"fa fa-pencil\" aria-hidden=\"true\"> </i> Exercice 6 </h3>\n\nÉcrire un programme qui définit et utilise des fonctions afin de dessiner la figure suivante:\n\n\n<div class = \"alert alert-block alert-warning\"> \n\n### Solution\n</div>" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "from turtle import *\n\ndef carre():\n for _ in range(4):\n left(90)\n forward(20)\n\ndef carre_quadruple():\n for _ in range(4):\n carre()\n left(90)\n\nfor _ in range(3):\n carre_quadruple()\n penup()\n forward(60)\n pendown()\n\ndone()\n", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "from turtle import *\n\ndef carre():\n for _ in range(4):\n left(90)\n forward(20)\n\ndef carre_quadruple():\n for _ in range(4):\n carre()\n left(90)\n\nfor _ in range(3):\n carre_quadruple()\n penup()\n forward(60)\n pendown()\n\ndone()\n" }, { + "cell_type": "code", + "execution_count": null, "metadata": { "trusted": true }, - "cell_type": "code", - "source": "", - "execution_count": null, - "outputs": [] + "outputs": [], + "source": "" } ], "metadata": { "kernelspec": { - "name": "python3", "display_name": "Python 3", - "language": "python" + "language": "python", + "name": "python3" } }, "nbformat": 4,