{"id":8993,"date":"2023-09-28T10:22:29","date_gmt":"2023-09-28T01:22:29","guid":{"rendered":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/?p=8993"},"modified":"2023-09-28T10:22:29","modified_gmt":"2023-09-28T01:22:29","slug":"python%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0%e5%85%a5%e9%96%80%ef%bc%9a%e5%9f%ba%e6%9c%ac%e3%81%8b%e3%82%89%e5%a7%8b%e3%82%81%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/archives\/8993","title":{"rendered":"Python\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5165\u9580\uff1a\u57fa\u672c\u304b\u3089\u59cb\u3081\u308b"},"content":{"rendered":"<div class=\"veu_autoEyeCatchBox\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"499\" src=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2023\/09\/27830981_m-1024x681.jpg\" class=\"attachment-large size-large wp-post-image\" alt=\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\" srcset=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2023\/09\/27830981_m-1024x681.jpg 1024w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2023\/09\/27830981_m-300x200.jpg 300w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2023\/09\/27830981_m-768x511.jpg 768w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2023\/09\/27830981_m-1536x1022.jpg 1536w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2023\/09\/27830981_m.jpg 1920w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/div>\n<p>Python\u306f\u3001\u521d\u5fc3\u8005\u304b\u3089\u30a8\u30ad\u30b9\u30d1\u30fc\u30c8\u307e\u3067\u5e83\u304f\u4f7f\u7528\u3055\u308c\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3059\u3002<br \/>\n\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Python\u306e\u57fa\u672c\u304b\u3089\u59cb\u3081\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u57fa\u790e\u3092\u7fd2\u5f97\u3059\u308b\u305f\u3081\u306e\u30b9\u30c6\u30c3\u30d7\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<br \/>\nPython\u306e\u57fa\u672c\u69cb\u6587\u3001\u5909\u6570\u3001\u5236\u5fa1\u69cb\u9020\u3001\u95a2\u6570\u3001\u305d\u3057\u3066\u77ed\u3044\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u542b\u3081\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-8994\" src=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2023\/09\/27830981_m-300x200.jpg\" alt=\"\" width=\"300\" height=\"200\" srcset=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2023\/09\/27830981_m-300x200.jpg 300w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2023\/09\/27830981_m-1024x681.jpg 1024w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2023\/09\/27830981_m-768x511.jpg 768w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2023\/09\/27830981_m-1536x1022.jpg 1536w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2023\/09\/27830981_m.jpg 1920w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Python\u306f\u3001\u305d\u306e\u30b7\u30f3\u30d7\u30eb\u306a\u69cb\u6587\u3068\u8c4a\u5bcc\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u304a\u304b\u3052\u3067\u3001\u591a\u304f\u306e\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u306b\u611b\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\nPython\u3092\u5b66\u3076\u3053\u3068\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u57fa\u790e\u3092\u7406\u89e3\u3059\u308b\u305f\u3081\u306e\u7d20\u6674\u3089\u3057\u3044\u30b9\u30bf\u30fc\u30c8\u5730\u70b9\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>Python\u306e\u57fa\u672c\u69cb\u6587<\/h3>\n<p>Python\u306e\u57fa\u672c\u69cb\u6587\u306f\u975e\u5e38\u306b\u8aad\u307f\u3084\u3059\u304f\u3001\u521d\u5b66\u8005\u306b\u3082\u7406\u89e3\u3057\u3084\u3059\u3044\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306f\u3001Python\u3067\u306e\u57fa\u672c\u7684\u306a\u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af\u306e\u4f8b\u3067\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true\"># \u3053\u308c\u306f\u30b3\u30e1\u30f3\u30c8\u3067\u3059\r\nprint(\"Hello, World!\")  # \u6587\u5b57\u5217\u3092\u51fa\u529b\u3057\u307e\u3059\r\n<\/pre>\n<p>Python\u306e\u57fa\u672c\u7684\u306a\u69cb\u6587\u8981\u7d20\u306b\u306f\u3001\u5909\u6570\u306e\u5ba3\u8a00\u3001\u5236\u5fa1\u69cb\u9020\uff08if\u6587\u3001for\u30eb\u30fc\u30d7\u3001while\u30eb\u30fc\u30d7\uff09\u3001\u95a2\u6570\u306e\u5b9a\u7fa9\u306a\u3069\u304c\u542b\u307e\u308c\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>\u5909\u6570\u3068\u30c7\u30fc\u30bf\u578b<\/h3>\n<p>Python\u3067\u306f\u3001\u5909\u6570\u306e\u5ba3\u8a00\u304c\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u3067\u3059\u3002\u5909\u6570\u306e\u578b\u306f\u81ea\u52d5\u7684\u306b\u63a8\u8ad6\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true \">x = 5  # \u6574\u6570\u578b\r\nname = \"John\"  # \u6587\u5b57\u5217\u578b\r\nis_student = True  # \u771f\u507d\u5024\u578b\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u5236\u5fa1\u69cb\u9020<\/h3>\n<p>Python\u306f\u3001\u6761\u4ef6\u6587\u3084\u30eb\u30fc\u30d7\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u8c4a\u5bcc\u306a\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true \">if x &gt; 0:\r\n    print(\"x\u306f\u6b63\u306e\u6570\u3067\u3059\")\r\nelse:\r\n    print(\"x\u306f\u30bc\u30ed\u307e\u305f\u306f\u8ca0\u306e\u6570\u3067\u3059\")\r\n\r\nfor i in range(5):\r\n    print(i)<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u95a2\u6570<\/h3>\n<p>\u95a2\u6570\u306f\u3001\u30b3\u30fc\u30c9\u306e\u518d\u5229\u7528\u6027\u3092\u9ad8\u3081\u308b\u305f\u3081\u306b\u975e\u5e38\u306b\u91cd\u8981\u3067\u3059\u3002Python\u3067\u306f\u95a2\u6570\u3092\u7c21\u5358\u306b\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true \">def greet(name):\r\n    return \"Hello, \" + name + \"!\"\r\n\r\nmessage = greet(\"Alice\")\r\nprint(message)\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0<\/h3>\n<p>\u6700\u5f8c\u306b\u3001\u7c21\u5358\u306a\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u306b\u6574\u6570\u3092\u5165\u529b\u3055\u305b\u3001\u305d\u306e\u6570\u304c\u5076\u6570\u304b\u5947\u6570\u304b\u3092\u5224\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:python decode:true \">def is_even(number):\r\n    return number % 2 == 0\r\n\r\nnum = int(input(\"\u6574\u6570\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: \"))\r\nif is_even(num):\r\n    print(num, \"\u306f\u5076\u6570\u3067\u3059\")\r\nelse:\r\n    print(num, \"\u306f\u5947\u6570\u3067\u3059\")\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u3053\u308c\u3067Python\u306e\u57fa\u672c\u306b\u3064\u3044\u3066\u306e\u7406\u89e3\u3044\u305f\u3060\u3051\u307e\u3057\u305f\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u57fa\u672c\u7de8\u3068\u3057\u3066\u3001\u307e\u305f\u4ed6\u306b\u3082\u6295\u7a3f\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python\u306f\u3001\u521d\u5fc3\u8005\u304b\u3089\u30a8\u30ad\u30b9\u30d1\u30fc\u30c8\u307e\u3067\u5e83\u304f\u4f7f\u7528\u3055\u308c\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3059\u3002 \u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Python\u306e\u57fa\u672c\u304b\u3089\u59cb\u3081\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u57fa\u790e\u3092\u7fd2\u5f97\u3059\u308b\u305f\u3081\u306e\u30b9\u30c6\u30c3\u30d7\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002 Python\u306e\u57fa\u672c\u69cb\u6587\u3001\u5909\u6570\u3001\u5236\u5fa1\u69cb [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8994,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"vkexunit_cta_each_option":"","footnotes":""},"categories":[6],"tags":[127],"class_list":["post-8993","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-engineer","tag-python"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/posts\/8993","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/comments?post=8993"}],"version-history":[{"count":1,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/posts\/8993\/revisions"}],"predecessor-version":[{"id":8995,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/posts\/8993\/revisions\/8995"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/media\/8994"}],"wp:attachment":[{"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/media?parent=8993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/categories?post=8993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/tags?post=8993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}