{"id":19842,"date":"2023-03-28T21:41:00","date_gmt":"2023-03-28T12:41:00","guid":{"rendered":"http:\/\/www.tyosuke20xx.com\/blog\/?p=19842"},"modified":"2023-03-28T21:41:00","modified_gmt":"2023-03-28T12:41:00","slug":"python%e3%81%ae%e5%9f%ba%e7%a4%8e","status":"publish","type":"post","link":"http:\/\/www.tyosuke20xx.com\/blog\/?p=19842","title":{"rendered":"Python\u306e\u57fa\u790e"},"content":{"rendered":"<p>Python\u306f\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u9ad8\u6c34\u6e96\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3001\u8aad\u307f\u3084\u3059\u304f\u66f8\u304d\u3084\u3059\u3044\u3068\u3044\u3046\u7279\u5fb4\u304c\u3042\u308a\u307e\u3059\u3002Python\u3092\u5b66\u3076\u305f\u3081\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u57fa\u672c\u7684\u306a\u6982\u5ff5\u3084\u69cb\u6587\u3092\u5b66\u3076\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u5909\u6570\u3068\u30c7\u30fc\u30bf\u578b<br \/>\n\u5909\u6570\u306f\u3001\u5024\u3092\u683c\u7d0d\u3059\u308b\u305f\u3081\u306e\u7bb1\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3001\u5909\u6570\u540d\u306b\u5024\u3092\u4ee3\u5165\u3057\u3066\u4f7f\u3044\u307e\u3059\u3002Python\u3067\u306f\u3001\u6574\u6570\uff08int\uff09\u3001\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\uff08float\uff09\u3001\u6587\u5b57\u5217\uff08str\uff09\u306a\u3069\u306e\u30c7\u30fc\u30bf\u578b\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\npython<br \/>\nCopy code<br \/>\nx = 3<br \/>\ny = 4.5<br \/>\nz = &#8220;Hello World&#8221;<br \/>\n\u6761\u4ef6\u5206\u5c90<br \/>\n\u30d7\u30ed\u30b0\u30e9\u30e0\u5185\u3067\u3001\u3042\u308b\u6761\u4ef6\u306b\u3088\u3063\u3066\u51e6\u7406\u3092\u5206\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002Python\u3067\u306f\u3001if\u6587\u3092\u4f7f\u3063\u3066\u6761\u4ef6\u5206\u5c90\u3092\u8868\u73fe\u3057\u307e\u3059\u3002<br \/>\npython<br \/>\nCopy code<br \/>\nif x > 5:<br \/>\n    print(&#8220;x is greater than 5&#8221;)<br \/>\nelse:<br \/>\n    print(&#8220;x is less than or equal to 5&#8221;)<br \/>\n\u30eb\u30fc\u30d7<br \/>\n\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3092\u884c\u3046\u305f\u3081\u306b\u3001for\u6587\u3084while\u6587\u3092\u4f7f\u3044\u307e\u3059\u3002for\u6587\u306f\u3001\u3042\u3089\u304b\u3058\u3081\u6c7a\u307e\u3063\u305f\u56de\u6570\u306e\u7e70\u308a\u8fd4\u3057\u306b\u4f7f\u308f\u308c\u307e\u3059\u3002while\u6587\u306f\u3001\u6761\u4ef6\u304c\u771f\u306e\u9593\u7e70\u308a\u8fd4\u3057\u307e\u3059\u3002<br \/>\npython<br \/>\nCopy code<br \/>\nfor i in range(1, 10):<br \/>\n    print(i)<\/p>\n<p>while x < 10:\n    print(x)\n    x += 1\n\u95a2\u6570\n\u8907\u6570\u306e\u51e6\u7406\u3092\u307e\u3068\u3081\u3066\u3001\u4f55\u5ea6\u3082\u4f7f\u3044\u56de\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306b\u3001\u95a2\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\npython\nCopy code\ndef add(x, y):\n    return x + y\n\nresult = add(3, 4)\nprint(result) # 7\n\u30e2\u30b8\u30e5\u30fc\u30eb\nPython\u306f\u3001\u69d8\u3005\u306a\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u6c4e\u7528\u7684\u306a\u51e6\u7406\u3092\u7c21\u5358\u306b\u5b9f\u88c5\u3067\u304d\u307e\u3059\u3002\npython\nCopy code\nimport math\n\nx = math.sqrt(4)\nprint(x) # 2.0\n\u4ee5\u4e0a\u304c\u3001Python\u306e\u57fa\u790e\u7684\u306a\u6982\u5ff5\u3084\u69cb\u6587\u3067\u3059\u3002Python\u306f\u975e\u5e38\u306b\u591a\u6a5f\u80fd\u306a\u8a00\u8a9e\u3067\u3042\u308a\u3001\u591a\u304f\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3084\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u304c\u3042\u308a\u307e\u3059\u3002\u3088\u308a\u9ad8\u5ea6\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3076\u5834\u5408\u306b\u306f\u3001\u3053\u308c\u3089\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3084\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u5b66\u3076\u3053\u3068\u304c\u5fc5\u8981\u306b\u306a\u3063\u3066\u304d\u307e\u3059\u3002\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python\u306f\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u9ad8\u6c34\u6e96\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3001\u8aad\u307f\u3084\u3059\u304f\u66f8\u304d\u3084\u3059\u3044\u3068\u3044\u3046\u7279\u5fb4\u304c\u3042\u308a\u307e\u3059\u3002Python\u3092\u5b66\u3076\u305f\u3081\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u57fa\u672c\u7684\u306a\u6982\u5ff5\u3084\u69cb\u6587\u3092\u5b66\u3076\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u5909\u6570\u3068\u30c7\u30fc\u30bf\u578b \u5909\u6570\u306f\u3001\u5024\u3092\u683c\u7d0d\u3059\u308b\u305f\u3081 &hellip; <a href=\"http:\/\/www.tyosuke20xx.com\/blog\/?p=19842\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Python\u306e\u57fa\u790e&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[65],"tags":[],"class_list":["post-19842","post","type-post","status-publish","format-standard","hentry","category-python"],"aioseo_notices":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/19842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=19842"}],"version-history":[{"count":0,"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/19842\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=19842"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.tyosuke20xx.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=19842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}