{"id":1356,"date":"2020-10-10T17:20:53","date_gmt":"2020-10-10T15:20:53","guid":{"rendered":"http:\/\/labodemaths.fr\/WordPress3\/?p=1356"},"modified":"2020-10-10T17:20:56","modified_gmt":"2020-10-10T15:20:56","slug":"2nde-arithmetique-avec-python","status":"publish","type":"post","link":"https:\/\/labodemaths.fr\/WordPress3\/2nde-arithmetique-avec-python\/","title":{"rendered":"2nde: arithm\u00e9tique avec Python"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>def pair(nombre):\n    if nombre%2==0:\n        return True\n    return False\n\ndef impair(nombre):\n    if nombre%2==1:\n        return True\n    return False\n\ndef impair_bis(nombre):\n    if nombre%2==0:\n        return False\n    return True\n\ndef divisible(a,b):\n    if a%b==0:\n        return True\n    return False\n\ndef diviseurs(nombre):\n    diviseurs=()\n    for i in range(1,nombre+1):\n        if divisible(nombre,i):\n            diviseurs=diviseurs+(i,)\n    return diviseurs\n\ndef premier(nombre):\n    if diviseurs(nombre)==(1,nombre):\n        return True\n    return False\n\n        \n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":1357,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[60],"tags":[],"_links":{"self":[{"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts\/1356"}],"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=1356"}],"version-history":[{"count":1,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts\/1356\/revisions"}],"predecessor-version":[{"id":1358,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts\/1356\/revisions\/1358"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/media\/1357"}],"wp:attachment":[{"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/media?parent=1356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/categories?post=1356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/tags?post=1356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}