{"id":92,"date":"2020-10-26T18:40:47","date_gmt":"2020-10-26T09:40:47","guid":{"rendered":"https:\/\/www.piyoproduction.com\/?p=92"},"modified":"2021-01-25T18:39:15","modified_gmt":"2021-01-25T09:39:15","slug":"11-python%e3%80%80%e5%ad%a6%e3%82%93%e3%81%a0%e3%81%93%e3%81%a8%e3%81%ae%e3%83%a1%e3%83%a2%ef%bc%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a01%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.piyoproduction.com\/?p=92","title":{"rendered":"11. Python\u3000\u5b66\u3093\u3060\u3053\u3068\u306e\u30e1\u30e2\uff08\u30d7\u30ed\u30b0\u30e9\u30e0\u51e6\u7406\uff09"},"content":{"rendered":"\n<p>\u524d\u56de\u306b\u7d9a\u304d\u3001Python\u306e\u5b66\u3093\u3060\u3053\u3068\u306e\u30e1\u30e2\u3002\u4eca\u56de\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u3002<br>\u5b66\u3093\u3060\u51e6\u7406\u3092\u8868\u306b\u307e\u3068\u3081\u3066\u3044\u304d\u307e\u3059\u3002\uff08\u9069\u5b9c\u66f4\u65b0\uff09<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><tbody><tr><td>\u51e6\u7406<\/td><td>\u30b3\u30de\u30f3\u30c9<\/td><td>\u4f8b<\/td><td>\u5099\u8003<\/td><\/tr><tr><td>Python\u306e\u958b\u59cb<\/td><td>python<\/td><td><\/td><td>Python\u306e\u958b\u59cb<\/td><\/tr><tr><td>Python\u7d42\u4e86<\/td><td>exit()<\/td><td><\/td><td>Python\u306e\u7d42\u4e86<\/td><\/tr><tr><td>\u753b\u9762\u51fa\u529b<\/td><td>print (\u8868\u793a\u3057\u305f\u3044\u5024)<\/td><td>print (&#8216;Hello World&#8217;)<\/td><td>\u6587\u5b57\u5217\u4ee5\u5916\uff08\u6570\u5f0f\u30fb\u51e6\u7406\u3082OK\uff09<\/td><\/tr><tr><td>python\u30d5\u30a1\u30a4\u30eb\u306e\u5b9f\u884c<\/td><td>python \u30d5\u30a1\u30a4\u30eb\u540d<\/td><td>python sample.py<\/td><td><\/td><\/tr><tr><td>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u79fb\u52d5<\/td><td>cd \u9077\u79fb\u5148\u30c7\u30a3\u30ec\u30af\u30c8\u30ea<\/td><td>cd C:\\Users\\~~<\/td><td><\/td><\/tr><tr><td>\u6587\u5b57\u5217\u306e\u7f6e\u63db\u51e6\u7406<\/td><td>replace<\/td><td>[\u5bfe\u8c61\u6587\u5b57\u5217].replace(&#8216;\u7f6e\u304d\u63db\u3048\u305f\u3044\u6587\u5b57\u5217&#8217;,&#8217;\u7f6e\u304d\u63db\u3048\u308b\u6587\u5b57\u5217&#8217;)<\/td><td><\/td><\/tr><tr><td>\u5909\u6570\u306e\u5185\u5bb9\u3092\u57cb\u3081\u8fbc\u307f\u753b\u9762\u51fa\u529b<\/td><td>print (f'{\u5909\u6570\u5024}&#8217;)<\/td><td>print (f&#8217;\u79c1\u306f{\uff5e\uff5e\uff5e\uff5e}\u3067\u3059&#8217;)<\/td><td>\u5909\u6570\u306e\u524d\u5f8c\u306b\u56fa\u5b9a\u5024\u3092\u52a0\u3048\u3066\u3082OK<\/td><\/tr><tr><td>\u6587\u5b57\u5165\u529b<\/td><td>\u623b\u308a\u5024 = input(\u5f15\u6570)<\/td><td>my_name = input(&#8216;\u540d\u524d\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044&#8217;)<\/td><td>\u5165\u529b\u5185\u5bb9\u3092\u5909\u6570\u306b\u4ee3\u5165<\/td><\/tr><tr><td>\u6761\u4ef6\u5206\u5c90(1)<\/td><td>if \u6761\u4ef6\u5f0f1:<br>    \u51e6\u74061<\/td><td>if score = 100:<br>    print(&#8216;\u6e80\u70b9\u3067\u3059&#8217;)<\/td><td><\/td><\/tr><tr><td>\u6761\u4ef6\u5206\u5c90(2)<\/td><td>if \u6761\u4ef6\u5f0f1:<br>    \u51e6\u74061<br>elif \u6761\u4ef6\u5f0f2:<br>    \u51e6\u74062<\/td><td>if score = 100:<br>    print(&#8216;\u6e80\u70b9\u3067\u3059&#8217;)<br>elif score &lt; 100 and score &gt;= 60:<br>    print(&#8216;\u5408\u683c\u70b9\u3067\u3059&#8217;)<\/td><td>\u6761\u4ef6\u5206\u5c90\u304c\u8907\u6570\u3042\u308b\u5834\u5408\u306f\u3001\u305d\u306e\u6570\u3060\u3051elif\u3092\u8db3\u3057\u3066\u3044\u304f<\/td><\/tr><tr><td>\u6761\u4ef6\u5206\u5c90(3)<\/td><td>if \u6761\u4ef6\u5f0f1:<br>    \u51e6\u74061<br>elif \u6761\u4ef6\u5f0f2:<br>    \u51e6\u74062<br>else:<br>    \u51e6\u74063<\/td><td>if score = 100:<br>    print(&#8216;\u6e80\u70b9\u3067\u3059&#8217;)<br>elif score &lt; 100 and score &gt;= 60:<br>    print(&#8216;\u5408\u683c\u70b9\u3067\u3059&#8217;)<br>else:<br>    print(&#8216;\u3082\u3046\u5c11\u3057\u9811\u5f35\u308a\u307e\u3057\u3087\u3046&#8217;)<\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u306b\u7d9a\u304d\u3001Python\u306e\u5b66\u3093\u3060\u3053\u3068\u306e\u30e1\u30e2\u3002\u4eca\u56de\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u3002\u5b66\u3093\u3060\u51e6\u7406\u3092\u8868\u306b\u307e\u3068\u3081\u3066\u3044\u304d\u307e\u3059\u3002\uff08\u9069\u5b9c\u66f4\u65b0\uff09 \u51e6\u7406 \u30b3\u30de\u30f3\u30c9 \u4f8b \u5099\u8003 Python\u306e\u958b\u59cb python Python\u306e\u958b\u59cb Python\u7d42\u4e86 exit() Python\u306e\u7d42\u4e86 \u753b\u9762\u51fa\u529b print (\u8868\u793a\u3057\u305f\u3044\u5024) print (&#8216;Hello World&#8217;) \u6587\u5b57\u5217\u4ee5\u5916\uff08\u6570\u5f0f\u30fb\u51e6\u7406\u3082OK\uff09 python\u30d5\u30a1\u30a4\u30eb\u306e\u5b9f\u884c python&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,8],"tags":[],"class_list":["post-92","post","type-post","status-publish","format-standard","hentry","category-python","category-8"],"_links":{"self":[{"href":"https:\/\/www.piyoproduction.com\/index.php?rest_route=\/wp\/v2\/posts\/92","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.piyoproduction.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.piyoproduction.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.piyoproduction.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.piyoproduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=92"}],"version-history":[{"count":16,"href":"https:\/\/www.piyoproduction.com\/index.php?rest_route=\/wp\/v2\/posts\/92\/revisions"}],"predecessor-version":[{"id":124,"href":"https:\/\/www.piyoproduction.com\/index.php?rest_route=\/wp\/v2\/posts\/92\/revisions\/124"}],"wp:attachment":[{"href":"https:\/\/www.piyoproduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=92"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.piyoproduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=92"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.piyoproduction.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=92"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}