{"id":2541,"date":"2025-09-22T02:45:00","date_gmt":"2025-09-22T00:45:00","guid":{"rendered":"https:\/\/labodemaths.fr\/WordPress3\/?p=2541"},"modified":"2025-09-25T16:18:38","modified_gmt":"2025-09-25T14:18:38","slug":"nsi-jeu-du-pendu","status":"publish","type":"post","link":"https:\/\/labodemaths.fr\/WordPress3\/nsi-jeu-du-pendu\/","title":{"rendered":"Nsi: 2025-2026, JEU DU PENDU"},"content":{"rendered":"\n<p>Compl\u00e9ter et corriger cette proposition de code<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mot_mystere=\"informatique\"\r\ndef affichage_mystere(nom):\r\n    '''\r\n    >>>affichage_mystere(\"nom\")\r\n    \"---\"\r\n    >>>affichage_mystere(nom_mystere)\r\n    \"------------\"\r\n    '''\r\n    retour=\"\"\r\n    for carac in nom:\r\n        retour+=\"-\"\r\n    return retour\r\n    \r\n    \r\ndef proposition_lettre(mot,lettre):\r\n    '''\r\n    >>>nom_mystere=\"informatique\"\r\n    >>>proposition_lettre(\"------------\",\"i\")\r\n    \"i-------i---\"\r\n    >>>proposition_lettre(\"i-------i---\",\"o\")\r\n    \"i--o----i---\"\r\n    >>>proposition_lettre(\"i-------i---\",\"z\")\r\n    \"i-------i---\"\r\n    '''\r\n    retour=\"\"\r\n    for i in range(len(mot)):\r\n        if mot&#91;i]==\"-\" and mot_mystere&#91;i]==lettre:\r\n            retour+=lettre\r\n        else:\r\n            retour+=mot&#91;i]\r\n    return retour\r\n\r\ndef jeu_pendu():\r\n    tentatives=10\r\n    reponse=affichage_mystere(mot_mystere)\r\n    while tentatives>0:\r\n        print(reponse)\r\n        lettre=input(\"Votre lettre ? \")\r\n        reponse=proposition_lettre(reponse,lettre)\r\n    \r\n    \r\n    \r\n    \r\n    \r\n    \r\n    \r\n    \r\n\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Compl\u00e9ter et corriger cette proposition de code<\/p>\n","protected":false},"author":2,"featured_media":2542,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[57],"tags":[],"_links":{"self":[{"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts\/2541"}],"collection":[{"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/comments?post=2541"}],"version-history":[{"count":9,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts\/2541\/revisions"}],"predecessor-version":[{"id":2896,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts\/2541\/revisions\/2896"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/media\/2542"}],"wp:attachment":[{"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/media?parent=2541"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/categories?post=2541"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/tags?post=2541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}