{"id":1021,"date":"2017-04-29T22:55:24","date_gmt":"2017-04-29T13:55:24","guid":{"rendered":"http:\/\/www.python.ambitious-engineer.com\/?p=1021"},"modified":"2017-05-03T16:26:16","modified_gmt":"2017-05-03T07:26:16","slug":"%e3%81%82%e3%81%be%e3%82%8a%e8%89%af%e3%81%8f%e3%81%aa%e3%81%84%e6%9b%b8%e3%81%8d%e6%96%b9-%e3%81%9d%e3%81%ae2-%e9%96%a2%e6%95%b0%e5%a4%96%e3%81%ae%e9%95%b7%e3%81%84%e5%87%a6%e7%90%86","status":"publish","type":"post","link":"https:\/\/www.python.ambitious-engineer.com\/archives\/1021","title":{"rendered":"\u3042\u307e\u308a\u826f\u304f\u306a\u3044\u66f8\u304d\u65b9 \u305d\u306e2 \u95a2\u6570\u5916\u306e\u9577\u3044\u51e6\u7406"},"content":{"rendered":"<p>\u3042\u308b\u7a0b\u5ea6\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u3051\u308b\u4eba\u3067\u3042\u308c\u3070\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u898f\u6a21\u306b\u5fdc\u3058\u3066\u9069\u5207\u306a\u5358\u4f4d\u3067\u95a2\u6570\u3001\u30af\u30e9\u30b9\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5206\u5272\u3057\u307e\u3059\u304c\u3001\u305d\u3093\u306a\u4eba\u3067\u3082\u5206\u6790\u30d0\u30c3\u30c1\u3084\u79fb\u884c\u30d0\u30c3\u30c1\u306e\u3088\u3046\u306b\u4f7f\u3044\u6368\u3066\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3059\u308b\u5834\u5408\u3001\u3064\u3044\u3064\u3044\u9577\u3044\u51e6\u7406\u306e\u584a\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u3044\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u3055\u3066\u3001\u4eca\u56de\u3082\u30af\u30a4\u30ba\u304b\u3089\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u6b63\u5e38\u306b\u52d5\u304d\u307e\u3059\u304c\u3001\u3069\u3093\u306a\u5371\u967a\u6027\u3092\u306f\u3089\u3093\u3067\u3044\u308b\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\ndef add100(arg):\r\n    &quot;&quot;&quot; \u5f15\u6570\u306b\u5bfe\u3057\u3066100\u52a0\u7b97\u3059\u308b &quot;&quot;&quot;\r\n    x = 100 \r\n    return arg + x \r\n\r\nif __name__ == '__main__':\r\n    x = 1 \r\n    y = 2 \r\n    z = x + y \r\n    w = add100(z)\r\n    print(w)\r\n<\/pre>\n<p>if __name__ == '__main__':\u306e\u4e0b\u3067\u5909\u6570\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u306f\u95a2\u6570\u306e\u5916\u306a\u306e\u3067\u30b0\u30ed\u30fc\u30d0\u30eb\u30b9\u30b3\u30fc\u30d7\u306b\u5c5e\u3057\u3066\u3044\u307e\u3059\u3002\uff08\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u306b\u3064\u3044\u3066\u306f<a href=\"http:\/\/www.python.ambitious-engineer.com\/archives\/260\">global\u5ba3\u8a00<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\uff09\u3002<\/p>\n<p>\u3055\u3089\u306b\u95a2\u6570add100\u5185\u30013\u884c\u76ee\u3067\u3082x\u3068\u3044\u3046\u5909\u6570\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u30024\u884c\u76eereturn arg + x\u3067\u66f8\u304b\u308c\u3066\u3044\u308bx\u306f\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u306ex\u306a\u306e\u3067\u3059\u304c\u30017\u884c\u76ee\u306e\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u3068\u540c\u3058\u540d\u524d\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n<p>\u3055\u3066\u3001\u4f55\u3089\u304b\u306e\u6a5f\u80fd\u4fee\u6b63\u30673\u884c\u76ee\u3092\u524a\u9664\u3059\u308b\u3068\u30014\u884c\u76ee\u306ex\u306f\u672a\u5b9a\u7fa9\u306a\u306e\u3067\u5b9f\u884c\u6642\u306b\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u304f\u308c\u305d\u3046\u306a\u3082\u306e\u306a\u306e\u3067\u3059\u304c\u3001\u30ed\u30fc\u30ab\u30eb\u30b9\u30b3\u30fc\u30d7\u306b\u5909\u6570\u304c\u306a\u3044\u5834\u5408\u306f\u81ea\u52d5\u7684\u306b\u30b0\u30ed\u30fc\u30d0\u30eb\u306e\u5909\u6570\u3092\u53c2\u7167\u3059\u308b\u305f\u3081\u30a8\u30e9\u30fc\u304c\u767a\u751f\u305b\u305a\u306b\u4e0d\u5177\u5408\u306b\u6c17\u3065\u304b\u306a\u3044\u5371\u967a\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u3059\u306e\u3067\u3001if __name__ == '__main__':\u306e\u4e0b\u306b\u306fmain\u95a2\u6570\u306e\u307f\u8a18\u8ff0\u3059\u308b\u3088\u3046\u306b\u3057\u305f\u307b\u3046\u304c\u3088\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\ndef add100(arg):\r\n    x = 100\r\n    return arg + x\r\n\r\ndef main():\r\n    x = 1 \r\n    y = 2\r\n    z = x + y\r\n    w = add100(z)\r\n    print(w)\r\n\r\nif __name__ == '__main__':\r\n    main()\r\n\r\n<\/pre>\n<p><a href=\"http:\/\/www.python.ambitious-engineer.com\/archives\/992\">\u524d\u56de<\/a>\u306e\u5185\u5bb9\u3068\u3082\u5c11\u3057\u304b\u3076\u308b\u306e\u3067\u3059\u304c\u3001python\u3067\u3042\u308b\u7a0b\u5ea6\u9577\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u3066\u4e0d\u601d\u8b70\u306a\u6319\u52d5\u3092\u3059\u308b\u5834\u5408\uff08\u3042\u304f\u307e\u3067\u3082\u308f\u305f\u3057\u306e\u7d4c\u9a13\u4e0a\u3067\u3059\u304c\uff09\u5909\u6570\u306e\u6c5a\u67d3\u304c\u539f\u56e0\u3068\u306a\u3063\u3066\u3044\u305f\u3053\u3068\u304c\u3001\u3042\u308b\u4e00\u5b9a\u306e\u5272\u5408\u3067\u8d77\u304d\u3066\u3044\u307e\u3057\u305f\u3002\u524d\u56de\u306e\u3082\u306e\u306f\uff08\u5b8c\u5168\u306a\uff09\u30b0\u30ed\u30fc\u30d0\u30eb\u306a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3001\u4eca\u56de\u306e\u30b5\u30f3\u30d7\u30eb\u306f\u30e2\u30b8\u30e5\u30fc\u30eb\u5185\u3067\u306e\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u306b\u95a2\u3059\u308b\u3082\u306e\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3042\u308b\u7a0b\u5ea6\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u3051\u308b\u4eba\u3067\u3042\u308c\u3070\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u898f\u6a21\u306b\u5fdc\u3058\u3066\u9069\u5207\u306a\u5358\u4f4d\u3067\u95a2\u6570\u3001\u30af\u30e9\u30b9\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5206\u5272\u3057\u307e\u3059\u304c\u3001\u305d\u3093\u306a\u4eba\u3067\u3082\u5206\u6790\u30d0\u30c3\u30c1\u3084\u79fb\u884c\u30d0\u30c3\u30c1\u306e\u3088\u3046\u306b\u4f7f\u3044\u6368\u3066\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3059\u308b\u5834\u5408\u3001\u3064\u3044\u3064\u3044\u9577\u3044\u51e6\u7406\u306e\u584a\u306e\u30b9\u30af\u30ea\u30d7...<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[13],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/1021"}],"collection":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/comments?post=1021"}],"version-history":[{"count":8,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/1021\/revisions"}],"predecessor-version":[{"id":1055,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/1021\/revisions\/1055"}],"wp:attachment":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/media?parent=1021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/categories?post=1021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/tags?post=1021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}