{"id":6753,"date":"2024-05-10T08:46:25","date_gmt":"2024-05-09T23:46:25","guid":{"rendered":"https:\/\/www.chihayafuru.jp\/tech\/?p=6753"},"modified":"2024-05-10T08:52:09","modified_gmt":"2024-05-09T23:52:09","slug":"%e5%be%8c%e7%bd%aeif%e6%a7%8b%e6%96%87","status":"publish","type":"post","link":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/archives\/6753","title":{"rendered":"\u5f8c\u7f6eif\u69cb\u6587"},"content":{"rendered":"<h3>Ruby<\/h3>\n<h4>if\u4fee\u98fe\u5b50<\/h4>\n<pre class=\"lang:ruby decode:true \" >print \"debug\\n\" if $DEBUG<\/pre>\n<hr>\n<h3>Python<\/h3>\n<h4>\u5185\u5305\u8868\u8a18<\/h4>\n<pre class=\"lang:python decode:true \" >odd_list = [x for x in range(100) if x % 2]<\/pre>\n<p>0\uff5e99\u307e\u3067\u306e\u30ea\u30b9\u30c8\u306e\u4e2d\u304b\u3089 x % 2 \u304c \u771f \u3059\u306a\u308f\u3061\u5947\u6570\u306e\u30ea\u30b9\u30c8\u3092\u62bd\u51fa\u3059\u308b\u3002<\/p>\n<h4>\u6761\u4ef6\u5f0f\uff08\u4e09\u9805\u6f14\u7b97\u5b50\uff09<\/h4>\n<pre class=\"lang:python decode:true \" >result = \"PASS\" if score &gt;= 60 else \"FAIL\"<\/pre>\n<p>\u70b9\u6570(score)\u304c60\u70b9\u4ee5\u4e0a\u306f\u5408\u683c(PASS)\u3001\u3055\u3082\u306a\u3051\u308c\u3070\u4e0d\u5408\u683c(FAIL)\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ruby if\u4fee\u98fe\u5b50 print &#8220;debug\\n&#8221; if $DEBUG Python \u5185\u5305\u8868\u8a18 odd_list = [x for x in range(100) if x % 2] 0\uff5e99\u307e\u3067\u306e\u30ea\u30b9\u30c8\u306e\u4e2d\u304b\u3089 x  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[52,12],"class_list":["post-6753","post","type-post","status-publish","format-standard","hentry","category-memo","tag-python","tag-ruby"],"_links":{"self":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/6753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/comments?post=6753"}],"version-history":[{"count":6,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/6753\/revisions"}],"predecessor-version":[{"id":6759,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/6753\/revisions\/6759"}],"wp:attachment":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/media?parent=6753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/categories?post=6753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/tags?post=6753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}