{"id":2807,"date":"2026-04-01T07:29:00","date_gmt":"2026-04-01T05:29:00","guid":{"rendered":"https:\/\/labodemaths.fr\/WordPress3\/?p=2807"},"modified":"2026-04-01T08:32:21","modified_gmt":"2026-04-01T06:32:21","slug":"snt-lecon-fonctions-tests-et-boucle-while","status":"publish","type":"post","link":"https:\/\/labodemaths.fr\/WordPress3\/snt-lecon-fonctions-tests-et-boucle-while\/","title":{"rendered":"SNT, le\u00e7on, fonctions, tests et boucle while"},"content":{"rendered":"\n<div class=\"wp-block-file\"><a href=\"https:\/\/labodemaths.fr\/WordPress3\/wp-content\/uploads\/2025\/05\/python_fonctions_test-boucle_while.pdf\">python_fonctions_test-boucle_while<\/a><a href=\"https:\/\/labodemaths.fr\/WordPress3\/wp-content\/uploads\/2025\/05\/python_fonctions_test-boucle_while.pdf\" class=\"wp-block-file__button\" download>T\u00e9l\u00e9charger<\/a><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>def f(x):\n    return x**2+5*x-3\n\ndef population(n):\n    return 1340*1.04**n\n\ndef landa(a,b,c):\n    return a+b-c\n\ndef boucle(a,b):\n    s=0\n    for i in range(a,b):\n        s+=i\n    return s\n\ndef impair(n):\n    if n%2==1:\n        print(\"impair\")\n    else:\n        print(\"pair\")\n        \ndef impair(n):\n    if n%2!=0:\n        print(\"impair\")\n    else:\n        print(\"pair\")\n        \ndef boucle(a):\n    while a&lt;10:\n        a=a+2\n    return a\n\ndef depassement(k):\n    n=0\n    while (1+k\/100)**n&lt;2:\n        n=n+1\n    return n\n\ndef ulam(n):\n    while n!=1:\n        if n%2==0:\n            n=n\/\/2\n        else:\n            n=3*n+1\n        print(n)\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[56],"tags":[],"_links":{"self":[{"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts\/2807"}],"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=2807"}],"version-history":[{"count":2,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts\/2807\/revisions"}],"predecessor-version":[{"id":2812,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts\/2807\/revisions\/2812"}],"wp:attachment":[{"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/media?parent=2807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/categories?post=2807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/tags?post=2807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}