{"id":39,"date":"2021-09-27T16:45:22","date_gmt":"2021-09-27T14:45:22","guid":{"rendered":"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/?p=39"},"modified":"2022-01-17T17:13:43","modified_gmt":"2022-01-17T16:13:43","slug":"python-2","status":"publish","type":"post","link":"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/?p=39","title":{"rendered":"Python."},"content":{"rendered":"\n<p><br>Python est un langage de programmation d\u00e9velopp\u00e9 par Guido Van Rossum au d\u00e9but des ann\u00e9es 1980. Il est le langage de programmation open source le plus utilis\u00e9 par les informaticiens. Il est utilis\u00e9 notamment pour le d\u00e9veloppement web, l&rsquo;IA, le machine learning, les syst\u00e8mes d&rsquo;exploitations, le d\u00e9veloppement d&rsquo;applications mobiles, les jeux vid\u00e9os et bien d&rsquo;autres.<\/p>\n\n\n\n<p>Python utilise des variables.<\/p>\n\n\n\n<p>Une variable est une \u00e9tiquette permettant d\u2019identifier une zone de la m\u00e9moire stockant une valeur qui lui a \u00e9t\u00e9 affect\u00e9e.<\/p>\n\n\n\n<p class=\"has-normal-font-size\">Voici 4 types de variables : <strong>int<\/strong>, <strong>float<\/strong>, <strong>str<\/strong>, <strong>bool<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"794\" height=\"333\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-3.png\" alt=\"\" class=\"wp-image-41\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-3.png 794w, http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-3-300x126.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-3-768x322.png 768w\" sizes=\"(max-width: 794px) 100vw, 794px\" \/><\/figure>\n\n\n\n<p><strong><em>Voici les expressions bool\u00e9ennes :<\/em><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"729\" height=\"541\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-4.png\" alt=\"\" class=\"wp-image-42\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-4.png 729w, http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-4-300x223.png 300w\" sizes=\"(max-width: 729px) 100vw, 729px\" \/><\/figure>\n\n\n\n<p>Les expressions bool\u00e9ennes servent \u00e0 tester si une fonction est vraie ou fausse.<\/p>\n\n\n\n<p><strong><em>La structure conditionnelle if :<\/em><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"855\" height=\"92\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-5.png\" alt=\"\" class=\"wp-image-43\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-5.png 855w, http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-5-300x32.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-5-768x83.png 768w\" sizes=\"(max-width: 855px) 100vw, 855px\" \/><\/figure>\n\n\n\n<p>Test est une expression bool\u00e9enne.<br>L\u2019instruction ou les instructions ne seront ex\u00e9cut\u00e9es que si le r\u00e9sultat de l\u2019expression bool\u00e9enne est True.<br>La tabulation devant l\u2019instruction est indispensable. On parle d\u2019indentation.<br>On peut ajouter un bloc d\u2019instructions si la condition n\u2019est pas v\u00e9rifi\u00e9e.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"795\" height=\"313\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-6.png\" alt=\"\" class=\"wp-image-44\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-6.png 795w, http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-6-300x118.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-6-768x302.png 768w\" sizes=\"(max-width: 795px) 100vw, 795px\" \/><\/figure>\n\n\n\n<p><strong><em>La Boucle For :<\/em><\/strong><\/p>\n\n\n\n<p>La boucle for permet de faire des r\u00e9p\u00e9titions sur un \u00e9l\u00e9ment, comme une cha\u00eene de caract\u00e8res ou une liste. Le mot clef in v\u00e9rifie l\u2019appartenance d\u2019un \u00e9l\u00e9ment \u00e0 une s\u00e9quence.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"785\" height=\"294\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-7.png\" alt=\"\" class=\"wp-image-45\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-7.png 785w, http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-7-300x112.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/wp-content\/uploads\/sites\/16\/2021\/09\/image-7-768x288.png 768w\" sizes=\"(max-width: 785px) 100vw, 785px\" \/><\/figure>\n\n\n\n<p><strong><em>La Boucle While<\/em><\/strong> <strong><em>:<\/em><\/strong><\/p>\n\n\n\n<p>En anglais \u00bb while \u00bb signifie \u00ab Tant que \u00bb. Pour cr\u00e9er une boucle , il faut donc utiliser ce mot cl\u00e9 suivi d\u2019une indication qui dit quand la boucle peut \u00e9ventuellement s\u2019arr\u00eater.Contrairement \u00e0 la boucle born\u00e9e for on a ici une boucle dite non born\u00e9e.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python est un langage de programmation d\u00e9velopp\u00e9 par Guido Van Rossum au d\u00e9but des ann\u00e9es 1980. Il est le langage de programmation open source le plus utilis\u00e9 par les informaticiens. Il est utilis\u00e9 notamment pour le d\u00e9veloppement web, l&rsquo;IA, le machine learning, les syst\u00e8mes d&rsquo;exploitations, le d\u00e9veloppement d&rsquo;applications mobiles, les jeux vid\u00e9os et bien d&rsquo;autres. [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":179,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/index.php?rest_route=\/wp\/v2\/posts\/39"}],"collection":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/index.php?rest_route=\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=39"}],"version-history":[{"count":2,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/index.php?rest_route=\/wp\/v2\/posts\/39\/revisions"}],"predecessor-version":[{"id":55,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/index.php?rest_route=\/wp\/v2\/posts\/39\/revisions\/55"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/index.php?rest_route=\/wp\/v2\/media\/179"}],"wp:attachment":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/lukas\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}