{"id":18,"date":"2021-09-20T16:38:56","date_gmt":"2021-09-20T14:38:56","guid":{"rendered":"https:\/\/yb-isn.fr\/2021\/nsi\/carla\/?p=18"},"modified":"2021-09-20T16:38:56","modified_gmt":"2021-09-20T14:38:56","slug":"programme-conversion-et-e","status":"publish","type":"post","link":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/?p=18","title":{"rendered":"programme conversion $ et \u20ac"},"content":{"rendered":"\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\" style=\"flex-basis:100%\">\n<p>#on importe la librairie maths<br \/>import math<br \/>#on pose la questionb de \u20ac ou $<br \/>a=input(\u00ab\u00a0avez vous des dollars ou des euros?$=1 \u20ac=2&#8230;..\u00a0\u00bb)<br \/>#si la reponse est 1(donc dollar), on demande combien<br \/>if a==&rsquo;1&prime;:<br \/>b=input(\u00ab\u00a0combien de $ avez vous\u00a0\u00bb)<br \/>b=float(b)<br \/>#on fait l&rsquo;operation et donne la reponse avec la formulation<br \/>operation=0.85*(b)\/1<br \/>operation=math.floor(operation*100)\/100<br \/>phrase=&rsquo; vos &lsquo;+str(b)+&rsquo;$ valent &lsquo;+str(operation)+&rsquo; en euros &lsquo;<br \/>print (phrase)<br \/>#si la reponse est 2(donc euro), on demande combien <br \/>if a==&rsquo;2&prime;:<br \/>b=input(\u00ab\u00a0combien de \u20ac avez vous\u00a0\u00bb)<br \/>b=float(b)<br \/>#on fait l&rsquo;operation et donne la reponse avec la formulation<br \/>operation2=1.3203*(b)\/1<br \/>operation2=math.floor(operation2*100)\/100<br \/>phrase=&rsquo;vos &lsquo;+str(b)+&rsquo;\u20ac valent &lsquo;+str(operation2)+&rsquo; en dollars &lsquo;<br \/>print(phrase)<br \/><br \/><\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>#on importe la librairie mathsimport math#on pose la questionb de \u20ac ou $a=input(\u00ab\u00a0avez vous des dollars ou des euros?$=1 \u20ac=2&#8230;..\u00a0\u00bb)#si la reponse est 1(donc dollar), on demande combienif a==&rsquo;1&prime;:b=input(\u00ab\u00a0combien de $ avez vous\u00a0\u00bb)b=float(b)#on fait l&rsquo;operation et donne la reponse avec la formulationoperation=0.85*(b)\/1operation=math.floor(operation*100)\/100phrase=&rsquo; vos &lsquo;+str(b)+&rsquo;$ valent &lsquo;+str(operation)+&rsquo; en euros &lsquo;print (phrase)#si la reponse est 2(donc euro),&hellip; <a class=\"more-link\" href=\"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/?p=18\">Poursuivre la lecture <span class=\"screen-reader-text\">programme conversion $ et \u20ac<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=\/wp\/v2\/posts\/18"}],"collection":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18"}],"version-history":[{"count":2,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=\/wp\/v2\/posts\/18\/revisions"}],"predecessor-version":[{"id":20,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=\/wp\/v2\/posts\/18\/revisions\/20"}],"wp:attachment":[{"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yb-isn.fr\/2021\/nsi\/carla\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}