{"id":442,"date":"2022-01-28T15:06:20","date_gmt":"2022-01-28T14:06:20","guid":{"rendered":"http:\/\/yb-isn.fr\/2021\/nsi\/?p=442"},"modified":"2022-01-28T16:00:07","modified_gmt":"2022-01-28T15:00:07","slug":"corrige-du-devoir-donne-le-24-01-2022","status":"publish","type":"post","link":"http:\/\/yb-isn.fr\/2021\/nsi\/?p=442","title":{"rendered":"corrig\u00e9 du devoir donn\u00e9 le 24\/01\/2022"},"content":{"rendered":"<p><!--more--><\/p>\n\n<a href=\"http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/Devoir-NSI-le-24.pdf\" class=\"pdfemb-viewer\" style=\"\" data-width=\"max\" data-height=\"max\"  data-toolbar=\"bottom\" data-toolbar-fixed=\"off\">Devoir-NSI-le-24<br\/><\/a>\n<p class=\"wp-block-pdfemb-pdf-embedder-viewer\"><\/p>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background\">Exercice 1<\/p>\n\n\n\n<iframe loading=\"lazy\" width=\"800\" height=\"500\" frameborder=\"0\" src=\"https:\/\/pythontutor.com\/iframe-embed.html#code=%0Adef%20f%28T%29%3A%0A%20%20%20%20s%3D0%0A%20%20%20%20for%20k%20in%20T%3A%0A%20%20%20%20%20%20%20%20if%20k%3D%3D8%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20s%3Ds%2B1%0A%20%20%20%20if%20s%3E1%3A%0A%20%20%20%20%20%20%20%20return%20True%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20return%20False%0A%20%20%20%20%0AT%3D%5B1,5,8,2,5,8%5D%0Aa%3Df%28T%29%0Aprint%28a%29&amp;codeDivHeight=400&amp;codeDivWidth=350&amp;cumulative=false&amp;curInstr=0&amp;heapPrimitives=nevernest&amp;origin=opt-frontend.js&amp;py=3&amp;rawInputLstJSON=%5B%5D&amp;textReferences=false\"> <\/iframe>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background\">Exercice 2<\/p>\n\n\n\n<p><\/p>\n\n\n\n<iframe loading=\"lazy\" width=\"800\" height=\"500\" frameborder=\"0\" src=\"https:\/\/pythontutor.com\/iframe-embed.html#code=def%20mystere%28T%29%3A%0A%20%20%20%20s%3D0%0A%20%20%20%20for%20k%20in%20T%3A%0A%20%20%20%20%20%20%20%20if%20k%252%3D%3D0%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20s%3Ds%2Bk%0A%20%20%20%20return%20s%0A%0AT%3D%5B1,5,8,2,5,8%5D%0Aa%3Dmystere%28T%29%0Aprint%28a%29&amp;codeDivHeight=400&amp;codeDivWidth=350&amp;cumulative=false&amp;curInstr=0&amp;heapPrimitives=nevernest&amp;origin=opt-frontend.js&amp;py=3&amp;rawInputLstJSON=%5B%5D&amp;textReferences=false\"> <\/iframe>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background\">Exercice 3<\/p>\n\n\n\n<iframe loading=\"lazy\" width=\"800\" height=\"500\" frameborder=\"0\" src=\"https:\/\/pythontutor.com\/iframe-embed.html#code=def%20mystere%28n,L%29%3A%0A%20%20%20%20for%20x%20in%20L%3A%0A%20%20%20%20%20%20%20%20if%20n%3D%3Dx%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20True%0A%20%20%20%20return%20False%0A%0AT%3D%5B1,5,8,2,5,8%5D%0Aa%3Dmystere%288,T%29%0Aprint%28a%29&amp;codeDivHeight=400&amp;codeDivWidth=350&amp;cumulative=false&amp;curInstr=0&amp;heapPrimitives=nevernest&amp;origin=opt-frontend.js&amp;py=3&amp;rawInputLstJSON=%5B%5D&amp;textReferences=false\"> <\/iframe>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background\">Exercice 4<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-3.png\" alt=\"\" class=\"wp-image-450\" width=\"449\" height=\"152\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-3.png 897w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-3-300x101.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-3-768x259.png 768w\" sizes=\"(max-width: 449px) 100vw, 449px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"971\" height=\"126\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-5.png\" alt=\"\" class=\"wp-image-452\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-5.png 971w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-5-300x39.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-5-768x100.png 768w\" sizes=\"(max-width: 971px) 100vw, 971px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-10-1024x140.png\" alt=\"\" class=\"wp-image-471\" width=\"768\" height=\"105\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-10-1024x140.png 1024w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-10-300x41.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-10-768x105.png 768w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-10.png 1409w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background\">Exercice 5<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-11.png\" alt=\"\" class=\"wp-image-473\" width=\"466\" height=\"361\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-11.png 931w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-11-300x232.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-11-768x595.png 768w\" sizes=\"(max-width: 466px) 100vw, 466px\" \/><\/figure>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background\">Exercice 6<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-7-1024x263.png\" alt=\"\" class=\"wp-image-454\" width=\"768\" height=\"197\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-7-1024x263.png 1024w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-7-300x77.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-7-768x197.png 768w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-7.png 1305w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background\">Exercice 7<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-8-1024x273.png\" alt=\"\" class=\"wp-image-457\" width=\"567\" height=\"151\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-8-1024x273.png 1024w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-8-300x80.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-8-768x205.png 768w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-8.png 1133w\" sizes=\"(max-width: 567px) 100vw, 567px\" \/><\/figure>\n\n\n\n<p><blockquote class=\"wp-embedded-content\" data-secret=\"lVTo5ZLgoz\"><a href=\"http:\/\/yb-isn.fr\/2021\/nsi\/?p=357\">Interaction avec l&rsquo;utilisateur dans une page web<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"\u00ab\u00a0Interaction avec l&rsquo;utilisateur dans une page web\u00a0\u00bb &#8212; Num\u00e9rique et Sciences Informatiques\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/?p=357&#038;embed=true#?secret=lVTo5ZLgoz\" data-secret=\"lVTo5ZLgoz\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background\">Exercice 8<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-9-1024x72.png\" alt=\"\" class=\"wp-image-460\" width=\"768\" height=\"54\" srcset=\"http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-9-1024x72.png 1024w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-9-300x21.png 300w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-9-768x54.png 768w, http:\/\/yb-isn.fr\/2021\/nsi\/wp-content\/uploads\/2022\/01\/image-9.png 1394w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"godzilla\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def ecart(T):\n    min=T[0]\n    max=T[0]\n    for val in T[1:]:\n        if val&lt;min:\n            min=val\n        if val> max:\n            max=val\n    return max-min<\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":469,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/index.php?rest_route=\/wp\/v2\/posts\/442"}],"collection":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=442"}],"version-history":[{"count":11,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/index.php?rest_route=\/wp\/v2\/posts\/442\/revisions"}],"predecessor-version":[{"id":476,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/index.php?rest_route=\/wp\/v2\/posts\/442\/revisions\/476"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/index.php?rest_route=\/wp\/v2\/media\/469"}],"wp:attachment":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=442"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=442"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=442"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}