{"id":1656,"date":"2025-09-28T16:28:00","date_gmt":"2025-09-28T14:28:00","guid":{"rendered":"http:\/\/labodemaths.fr\/WordPress3\/?p=1656"},"modified":"2025-09-29T11:43:49","modified_gmt":"2025-09-29T09:43:49","slug":"nsi2020-2021tp3","status":"publish","type":"post","link":"https:\/\/labodemaths.fr\/WordPress3\/nsi2020-2021tp3\/","title":{"rendered":"NSI,2025-2026,dernier tp cha\u00eene de caract\u00e8res"},"content":{"rendered":"\n<div class=\"wp-block-file\"><a href=\"https:\/\/labodemaths.fr\/WordPress3\/wp-content\/uploads\/2021\/11\/NSI_TP3_chaine_caracteres-1.pdf\">NSI_TP_revisions<\/a><a href=\"https:\/\/labodemaths.fr\/WordPress3\/wp-content\/uploads\/2021\/11\/NSI_TP3_chaine_caracteres-1.pdf\" class=\"wp-block-file__button\" download>T\u00e9l\u00e9charger<\/a><\/div>\n\n\n\n<h3>Les fonctions \u00e0 compl\u00e9ter :<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Exercice 1\ndef creation_mail(nom,prenom):\n    '''\n    renvoie la cha\u00eene de caract\u00e8re prenom_nom@nsi_mail.fr\n    nom, prenom : str en majuscules ou minuscules\n    return : str\n    &gt;&gt;&gt;creation_mail(\"Python\",\"Bob\")\n    \"bob_python@nsi_mail.fr\"\n    '''\n\n# Exercice 2\ndef bonne_adresse_mail(adresse):\n    '''\n    renvoie True si l'adresse contient le caract\u00e8re @ et un . apr\u00e8s celui-ci,\n    renvoie False sinon\n    adresse : str\n    return : bool\n    &gt;&gt;&gt;bonne_adresse_mail(\"adresse\")\n    False\n    &gt;&gt;&gt;bonne_adresse_mail(\"adresse@nsi.fr\")\n    True\n    &gt;&gt;&gt;bonne_adresse_mail(\"nom.prenom@nsifr\")\n    False\n    &gt;&gt;&gt;bonne_adresse_mail(\"nom.prenom@nsi.com\")\n    True\n    '''\n\n# Exercice 3\ndef conversion_bin(nombre):\n    '''\n    convertit un entier naturel \u00e9crit en d\u00e9cimal en binaire\n    nombre : int\n    return : str\n    \n    &gt;&gt;&gt;conversion_bin(100)\n    '1100100'\n    '''<\/code><\/pre>\n\n\n\n<h3>Proposition correction exercices<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>Les fonctions \u00e0 compl\u00e9ter : Proposition correction exercices<\/p>\n","protected":false},"author":2,"featured_media":1658,"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\/1656"}],"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=1656"}],"version-history":[{"count":9,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts\/1656\/revisions"}],"predecessor-version":[{"id":2905,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts\/1656\/revisions\/2905"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/media\/1658"}],"wp:attachment":[{"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/media?parent=1656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/categories?post=1656"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/tags?post=1656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}