{"id":1488,"date":"2021-02-05T13:44:36","date_gmt":"2021-02-05T12:44:36","guid":{"rendered":"http:\/\/labodemaths.fr\/WordPress3\/?p=1488"},"modified":"2021-02-05T13:44:37","modified_gmt":"2021-02-05T12:44:37","slug":"2nde-fonctions-et-python","status":"publish","type":"post","link":"https:\/\/labodemaths.fr\/WordPress3\/2nde-fonctions-et-python\/","title":{"rendered":"2nde: Fonctions et python"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>import pylab\n\ndef f(x):\n    y=-x**2\n    return y\n\ndef tableau_valeurs(x_depart,x_fin,pas):\n    for x in range(x_depart,x_fin+pas,pas):\n        print(\"x = \",x,\"f(x) = \",f(x))\n    return\n\ndef courbe_f(x_depart,x_fin,n_pts):\n    pylab.title('Courbe repr\u00e9sentative de la fonction f')\n    pylab.xlabel('abscisse : Ox')\n    pylab.ylabel('ordonn\u00e9es : Oy')\n    pylab.grid()\n    x=pylab.linspace(x_depart,x_fin,n_pts)\n    y=f(x)\n    pylab.xlim(x_depart,x_fin)\n    pylab.ylim(min(y),max(y))\n    pylab.plot(x,y,color='blue',linestyle='solid',label='f')\n    pylab.legend(loc='lower left')\n    pylab.savefig(\"courbe_f.png\")\n    pylab.show()\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":1489,"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\/1488"}],"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=1488"}],"version-history":[{"count":1,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts\/1488\/revisions"}],"predecessor-version":[{"id":1490,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/posts\/1488\/revisions\/1490"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/media\/1489"}],"wp:attachment":[{"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/media?parent=1488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/categories?post=1488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labodemaths.fr\/WordPress3\/wp-json\/wp\/v2\/tags?post=1488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}