{"id":1041,"date":"2020-06-02T10:50:29","date_gmt":"2020-06-02T01:50:29","guid":{"rendered":"http:\/\/hirlab.net\/nblog\/?p=1041"},"modified":"2020-06-02T11:00:26","modified_gmt":"2020-06-02T02:00:26","slug":"python%e3%81%a7%e3%81%96%e3%81%a3%e3%81%8f%e3%82%8a%e7%90%86%e8%a7%a3%e3%81%99%e3%82%8b%e3%82%aa%e3%83%96%e3%82%b8%e3%82%a7%e3%82%af%e3%83%88%e6%8c%87%e5%90%91","status":"publish","type":"post","link":"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1041\/","title":{"rendered":"Python\u3067\u3056\u3063\u304f\u308a\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_11 counter-hierarchy counter-decimal ez-toc-light-blue\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">\u30b3\u30f3\u30c6\u30f3\u30c4<\/p>\n<span class=\"ez-toc-title-toggle\"><a class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\"><i class=\"ez-toc-glyphicon ez-toc-icon-toggle\"><\/i><\/a><\/span><\/div>\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1041\/#%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB\" title=\"\u306f\u3058\u3081\u306b\">\u306f\u3058\u3081\u306b<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1041\/#%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E6%8C%87%E5%90%91%EF%BC%88%E3%81%96%E3%81%A3%E3%81%8F%E3%82%8A%EF%BC%89\" title=\"\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\uff08\u3056\u3063\u304f\u308a\uff09\">\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\uff08\u3056\u3063\u304f\u308a\uff09<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1041\/#%E4%BB%8A%E5%9B%9E%E4%BD%9C%E3%82%8B%E3%83%A2%E3%83%8E\" title=\"\u4eca\u56de\u4f5c\u308b\u30e2\u30ce\">\u4eca\u56de\u4f5c\u308b\u30e2\u30ce<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1041\/#Python%E3%81%A7%E5%AE%9F%E8%A3%85%E3%81%97%E3%81%A6%E3%81%84%E3%81%8F\" title=\"Python\u3067\u5b9f\u88c5\u3057\u3066\u3044\u304f\">Python\u3067\u5b9f\u88c5\u3057\u3066\u3044\u304f<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1041\/#%E3%82%AF%E3%83%A9%E3%82%B9%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%A8%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E4%BD%9C%E3%82%8B\" title=\"\u30af\u30e9\u30b9\u30d5\u30a1\u30a4\u30eb\u3068\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308b\">\u30af\u30e9\u30b9\u30d5\u30a1\u30a4\u30eb\u3068\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308b<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1041\/#%E3%82%AF%E3%83%A9%E3%82%B9%E3%81%AE%E5%A4%96%E6%9E%A0%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B\" title=\"\u30af\u30e9\u30b9\u306e\u5916\u67a0\u3092\u4f5c\u6210\u3059\u308b\">\u30af\u30e9\u30b9\u306e\u5916\u67a0\u3092\u4f5c\u6210\u3059\u308b<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1041\/#%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%8B%E3%82%89%E5%91%BC%E3%81%B3%E5%87%BA%E3%81%97%E3%81%A6%E3%81%BF%E3%82%8B\" title=\"\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u547c\u3073\u51fa\u3057\u3066\u307f\u308b\">\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u547c\u3073\u51fa\u3057\u3066\u307f\u308b<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1041\/#%E3%83%A1%E3%83%B3%E3%83%90%E5%A4%89%E6%95%B0%E3%82%92%E5%AE%9A%E7%BE%A9%E3%81%99%E3%82%8B\" title=\"\u30e1\u30f3\u30d0\u5909\u6570\u3092\u5b9a\u7fa9\u3059\u308b\">\u30e1\u30f3\u30d0\u5909\u6570\u3092\u5b9a\u7fa9\u3059\u308b<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1041\/#%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89%E3%82%92%E3%82%82%E3%81%A3%E3%81%A8%E4%BD%9C%E3%82%8B\" title=\"\u30e1\u30bd\u30c3\u30c9\u3092\u3082\u3063\u3068\u4f5c\u308b\">\u30e1\u30bd\u30c3\u30c9\u3092\u3082\u3063\u3068\u4f5c\u308b<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1041\/#%E3%82%AB%E3%83%97%E3%82%BB%E3%83%AB%E5%8C%96%E3%81%AE%E6%83%85%E5%A0%B1%E9%9A%A0%E8%94%BD%E3%81%AE%E8%A9%B1\" title=\"\u30ab\u30d7\u30bb\u30eb\u5316\u306e\u60c5\u5831\u96a0\u853d\u306e\u8a71\">\u30ab\u30d7\u30bb\u30eb\u5316\u306e\u60c5\u5831\u96a0\u853d\u306e\u8a71<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1041\/#%E7%B6%99%E6%89%BF%E3%81%A8%E3%83%9D%E3%83%AA%E3%83%A2%E3%83%BC%E3%83%95%E3%82%A3%E3%82%BA%E3%83%A0%E3%81%AE%E8%A9%B1\" title=\"\u7d99\u627f\u3068\u30dd\u30ea\u30e2\u30fc\u30d5\u30a3\u30ba\u30e0\u306e\u8a71\">\u7d99\u627f\u3068\u30dd\u30ea\u30e2\u30fc\u30d5\u30a3\u30ba\u30e0\u306e\u8a71<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1041\/#%E7%B6%99%E6%89%BF\" title=\"\u7d99\u627f\">\u7d99\u627f<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1041\/#%E3%83%9D%E3%83%AA%E3%83%A2%E3%83%BC%E3%83%95%E3%82%A3%E3%82%BA%E3%83%A0\" title=\"\u30dd\u30ea\u30e2\u30fc\u30d5\u30a3\u30ba\u30e0\">\u30dd\u30ea\u30e2\u30fc\u30d5\u30a3\u30ba\u30e0<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1041\/#%E3%81%8A%E3%82%8F%E3%82%8A%E3%81%AB\" title=\"\u304a\u308f\u308a\u306b\">\u304a\u308f\u308a\u306b<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB\"><\/span>\u306f\u3058\u3081\u306b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u521d\u5fc3\u8005\u30d7\u30ed\u30b0\u30e9\u30de\u306f\u3060\u3044\u305f\u3044\u306f\u540c\u3058\u3068\u3053\u308d\u3067\u3064\u307e\u305a\u304d\u307e\u3059\uff0e<\/p>\n<p>\u305d\u308c\u306f\u300c\u30af\u30e9\u30b9\u300d\uff0e<\/p>\n<p>\u3082\u3063\u3068\u5927\u57df\u7684\u306b\u8a00\u3048\u3070<strong>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411<\/strong>\u3067\u3059\uff0e<\/p>\n<p>\u3053\u306e\u300c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u300d\u3068\u3044\u3046\u8003\u3048\u65b9\u306f\uff0c\u30d7\u30ed\u30b0\u30e9\u30de\u521d\u5b66\u8005\u306b\u3068\u3063\u3066\u5b9f\u614b\u304c\u308f\u304b\u3089\u305a\u5927\u304d\u306a\u58c1\u306b\u306a\u308a\u304c\u3061\u3067\u3059\uff0e<\/p>\n<p>\u307e\u305f\uff0c\u3053\u306e\u30ef\u30fc\u30c9\u3067\u691c\u7d22\u3057\u3066\u3082\u300c\u4f55\u8a00\u3063\u3066\u3093\u30b3\u30a4\u30c4\u300d\u3068\u306a\u3063\u3066\u3057\u307e\u3046\u4eba\u3082\u5c11\u306a\u304f\u306a\u3044\u306f\u305a\u3067\u3059\uff0e<\/p>\n<p>\u3068\u3044\u3046\u304b\uff0c<strong>\u4e2d\u7d1a\u8005\u30ec\u30d9\u30eb\u3067\u3042\u3063\u3066\u3082\u6df7\u4e71\u3057\u304c\u3061<\/strong>\u3067\u3059\uff0e<\/p>\n<p>\u305d\u3053\u3067\uff0c\u3053\u306e\u8a18\u4e8b\u3067\u306f<strong>Python\u3092\u901a\u3057\u3066\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3068\u306f\u4f55\u304b\u3092 \"\u3056\u3063\u304f\u308a\" \u3068\u7406\u89e3\u3067\u304d\u308b\u3053\u3068<\/strong>\u3092\u76ee\u7684\u3068\u3057\u3066\u3044\u307e\u3059\uff0e<\/p>\n<p>\u50d5\u306e\u60f3\u5b9a\u3068\u3057\u3066\u306f\uff0c<\/p>\n<ol>\n<li>\u3053\u306e\u8a18\u4e8b\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u30a2\u30a6\u30c8\u30e9\u30a4\u30f3\u3084\uff0c\u3056\u3063\u304f\u308a\u3068\u3057\u305f\u30a4\u30e1\u30fc\u30b8\u3092\u63b4\u3080<\/li>\n<li>\u4ed6\u306e\u4eba\u304c\u66f8\u3044\u305f\u8a18\u4e8b\u3067\uff0c\u3088\u308a\u6df1\u304f\u7406\u89e3\u3059\u308b (\u3067\u304d\u308c\u3070Python\u4ee5\u5916\u306e\u8a00\u8a9e\u3067)<\/li>\n<\/ol>\n<p>\u3068\u3044\u3063\u305f\u30b9\u30c6\u30c3\u30d7\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0e<\/p>\n<p>\u306a\u306e\u3067\uff0c<strong>\u3053\u306e\u8a18\u4e8b\u3060\u3051\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u3059\u3079\u3066\u3092\u7406\u89e3\u3067\u304d\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093<\/strong>\uff0e<\/p>\n<p>\u3042\u304f\u307e\u3067\uff0c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u4e3b\u8981\u6982\u5ff5\u3067\u3042\u308b\u30af\u30e9\u30b9\u3092\u4e3b\u8ef8\u3068\u3057\u305f\u5185\u5bb9\u3067\u3059\u306e\u3067\u60aa\u3057\u304b\u3089\u305a...<\/p>\n<p>\u305d\u3057\u3066\u306a\u305cPython\u3092\u4f7f\u3046\u304b\u3068\u3044\u3046\u3068\uff0c\u3044\u304f\u3064\u304b\u7406\u7531\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n<ol>\n<li>Python\u4eba\u53e3\u304c\u591a\u3044<\/li>\n<li>Python\u306f\u30b3\u30fc\u30c9\u304c\u8aad\u307f\u3084\u3059\u304f\uff0c\u4ed6\u8a00\u8a9e\u3067\u5b66\u3093\u3067\u3044\u308b\u4eba\u306b\u3082\u7406\u89e3\u3057\u3084\u3059\u3044<\/li>\n<li>\u7b46\u8005\u306e\u597d\u307f<\/li>\n<\/ol>\n<p>\u3067\u3059\uff0e<\/p>\n<p>\u307e\u3042\uff0c\u524d\u7f6e\u304d\u306f\u3055\u3066\u304a\u304d\u8a18\u4e8b\u3092\u9032\u3081\u307e\u3059\uff0e<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E6%8C%87%E5%90%91%EF%BC%88%E3%81%96%E3%81%A3%E3%81%8F%E3%82%8A%EF%BC%89\"><\/span>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\uff08\u3056\u3063\u304f\u308a\uff09<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1047\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/06\/1-e1591015861762.png\" alt=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\" width=\"1024\" height=\"568\" \/><\/p>\n<p>\u65e9\u901f\u3067\u3059\u304c\uff0c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306b\u3064\u3044\u3066\u3056\u3063\u304f\u308a\u8aac\u660e\u3057\u307e\u3059\uff0e<\/p>\n<p><strong>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3068\u306f\uff0c\u305d\u306e\u540d\u306e\u901a\u308a\"\u30e2\u30ce\"\u3068\u3057\u3066\u6271\u3048\u308b\u69d8\u306b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u3059\u308b\"\u8003\u3048\u65b9\"<\/strong>\u3067\u3059\uff0e<\/p>\n<p>\u306a\u3093\u306e\u3053\u3063\u3061\u3083\u3068\u601d\u3046\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\uff0c\u8eab\u306e\u56de\u308a\u306e\u3082\u306e\u3092\u60f3\u50cf\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff0e<\/p>\n<p>\u4f8b\u3048\u3070\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\uff0e<\/p>\n<p>\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u306f\u753b\u9762\u3092\u30bf\u30c3\u30c1\u3059\u308c\u3070\u30a2\u30d7\u30ea\u3092\u8d77\u52d5\u3067\u304d\u305f\u308a\uff0c\u96fb\u8a71\u3092\u304b\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u305f\u308a\u4fbf\u5229\u3067\u3059\u306d\uff0e<\/p>\n<p>\u3067\u3082\uff0c<strong>\u5229\u7528\u8005\u3067\u3042\u308b\u50d5\u3089\u306f\u305d\u306e\u5185\u90e8\u304c\u3069\u3093\u306a\u51e6\u7406\u3092\u3057\u3066\u3044\u308b\u304b\u77e5\u3089\u305a\u306b\u4f7f\u3048\u3066\u3044\u307e\u3059<\/strong>\uff0e<\/p>\n<p>\u3053\u308c\u304c\uff0c\"\u30e2\u30ce\"\u3068\u3057\u3066\u30d7\u30ed\u30b0\u30e9\u30e0\u3055\u308c\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\uff0e<\/p>\n<p>\u304d\u3063\u3068\u5b9f\u969b\u306f\uff0c\u30bf\u30c3\u30c1\u3055\u308c\u305f\u3089\u8907\u96d1\u306a\u51e6\u7406\u304c\u65bd\u3055\u308c\u3066\u3044\u308b\u3067\u3057\u3087\u3046\uff0e<\/p>\n<p>\u3057\u304b\u3057\uff0c\u3069\u3093\u306a\u306b\u8907\u96d1\u306a\u51e6\u7406\u304c\u30d7\u30ed\u30b0\u30e9\u30e0\u3055\u308c\u3066\u3044\u3088\u3046\u3068\u3082\uff0c\u30e6\u30fc\u30b6\u306f\u6df1\u304f\u8003\u3048\u308b\u3053\u3068\u306a\u304f\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u308b\uff0e<\/p>\n<p><strong>\u3053\u308c\u304c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u5927\u4e8b\u306a\u8003\u3048\u65b9\u3067\u3059\uff0e<\/strong><\/p>\n<p>\u305d\u3057\u3066\u305d\u306e\u30e2\u30ce\u3092\u4f5c\u308b\u306e\u306b\uff0c<strong>\u30af\u30e9\u30b9<\/strong>\u3068\u3044\u3046\u6982\u5ff5\u304c\u4e3b\u8ef8\u306b\u306a\u3063\u3066\u304d\u307e\u3059\uff0e<\/p>\n<p>\u30af\u30e9\u30b9\u3092\u4f7f\u3063\u3066\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u3051\u3070\uff0c\u305d\u308c\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3068\u307b\u3068\u3093\u3069\u8a00\u3048\u308b\u3067\u3057\u3087\u3046\uff0e<\/p>\n<p>\u3068\u307e\u3042\uff0c\u8a00\u8449\u3067\u66f8\u304b\u308c\u3066\u3082\u30d4\u30f3\u3068\u3053\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\uff0e<\/p>\n<p>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3067\u306f\u3088\u304f\u4e09\u5927\u8981\u7d20\u3068\u3057\u3066\u4ee5\u4e0b\u304c\u6319\u3052\u3089\u308c\u307e\u3059\uff0e<\/p>\n<ol>\n<li>\u30ab\u30d7\u30bb\u30eb\u5316<\/li>\n<li>\u7d99\u627f<\/li>\n<li>\u30dd\u30ea\u30e2\u30fc\u30d5\u30a3\u30ba\u30e0 (\u591a\u69d8\u6027)<\/li>\n<\/ol>\n<p>\u3053\u308c\u3089\u306f\uff0c\u305d\u308c\u305e\u308c\u8d85\u5927\u4e8b\u306a\u8981\u7d20\u3067\u3059\u304c\uff0c\u3053\u306e\u8a18\u4e8b\u3067\u306f<strong>\u4e00\u756a\u5927\u4e8b\u306a\u30ab\u30d7\u30bb\u30eb\u5316\u306b\u6ce8\u76ee\u3057\u3066\u89e3\u8aac\u3092\u884c\u3044\u307e\u3059<\/strong>\uff0e<\/p>\n<p>\u307e\u3042\u3067\u3082\uff0c\u4e00\u5fdc\u6700\u5f8c\u306b\u7d99\u627f\u3068\u30dd\u30ea\u30e2\u30fc\u30d5\u30a3\u30ba\u30e0\u306b\u5c11\u3057\u3060\u3051\u89e6\u308c\u307e\u3059\uff0e<\/p>\n<p>\u305d\u308c\u3067\u306f\u5b9f\u969b\u306b\u4f5c\u308a\u307e\u3057\u3087\u3046\uff0e<br \/>\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br \/>\n<ins class=\"adsbygoogle\" style=\"display: block; text-align: center;\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\" data-ad-client=\"ca-pub-7123758399787647\" data-ad-slot=\"1665651601\"><\/ins><br \/>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E4%BB%8A%E5%9B%9E%E4%BD%9C%E3%82%8B%E3%83%A2%E3%83%8E\"><\/span>\u4eca\u56de\u4f5c\u308b\u30e2\u30ce<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\uff0c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3092\u3056\u3063\u304f\u308a\u5b66\u3076\u305f\u3081\u306b\uff0c\u300cRobot\u30af\u30e9\u30b9\u300d\u3092\u4f5c\u308a\u307e\u3059\uff0e<\/p>\n<p>\u3044\u3084\uff0c\u6b63\u76f4\u306a\u3093\u3067\u3082\u826f\u3044\u306e\u3067\u3059\u304c\uff0c\u30b7\u30f3\u30d7\u30eb\u3067\u308f\u304b\u308a\u3084\u3059\u3044\u3082\u306e\u304c\u826f\u3044\u304b\u306a\u3068\uff0e<\/p>\n<p>\u306a\u3093\u306e\u30ed\u30dc\u30c3\u30c8\u3068\u3044\u3046\u308f\u3051\u3067\u3082\u306a\u304f\uff0c\u305f\u3060\u306e\u30ed\u30dc\u30c3\u30c8\u3067\u3059\uff0e<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Python%E3%81%A7%E5%AE%9F%E8%A3%85%E3%81%97%E3%81%A6%E3%81%84%E3%81%8F\"><\/span>Python\u3067\u5b9f\u88c5\u3057\u3066\u3044\u304f<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u305d\u308c\u3067\u306f\u5b9f\u88c5\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff0e<\/p>\n<p>\u5404\u30b9\u30c6\u30c3\u30d7\u3054\u3068\u306b\u5206\u3051\u3066\u89e3\u8aac\u3057\u307e\u3059\uff0e<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E3%82%AF%E3%83%A9%E3%82%B9%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%A8%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%92%E4%BD%9C%E3%82%8B\"><\/span>\u30af\u30e9\u30b9\u30d5\u30a1\u30a4\u30eb\u3068\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u672c\u5f53\u306f\u4e00\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u307e\u3068\u3081\u3066\u3057\u307e\u3063\u3066\u3082OK\u306a\u3093\u3067\u3059\u304c\uff0c\u308f\u304b\u308a\u3084\u3059\u304f\u3059\u308b\u305f\u3081\u306b\u5206\u3051\u307e\u3059\uff0e<\/p>\n<ol>\n<li>main.py<\/li>\n<li>robot.py<\/li>\n<\/ol>\n<p>\u306e\u4e8c\u3064\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\uff0e<\/p>\n<p>\u4ee5\u4e0a\u3067\u3059\uff0e<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E3%82%AF%E3%83%A9%E3%82%B9%E3%81%AE%E5%A4%96%E6%9E%A0%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B\"><\/span>\u30af\u30e9\u30b9\u306e\u5916\u67a0\u3092\u4f5c\u6210\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Python\u306b\u9650\u3089\u305a\uff0c\u30af\u30e9\u30b9\u8a2d\u8a08\u306b\u306f\u5fc5\u9808\u306a\u3082\u306e\u304c\u3044\u304f\u3064\u304b\u5b58\u5728\u3057\u307e\u3059\uff0e<\/p>\n<p>\u307e\u305a\u306f\uff0c<strong>\u30af\u30e9\u30b9\u5b9a\u7fa9<\/strong>\uff0e<\/p>\n<p>\u305d\u3057\u3066<strong>\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf<\/strong>\u3067\u3059\uff0e(Python\u306a\u3069\u3067\u306f\u30a4\u30cb\u30b7\u30e3\u30e9\u30a4\u30b6\u3068\u3082\u8a00\u3046\u3089\u3057\u3044\u3067\u3059\u306d)<\/p>\n<pre class=\"lang:python decode:true\" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\"># robot.py\r\nclass Robot: \r\n    \"\"\"\r\n    Robot \u30af\u30e9\u30b9\r\n    \"\"\"\r\n    \r\n    def __init__(self):\r\n        \"\"\"\r\n        \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\r\n        \"\"\"\r\n        pass\r\n<\/pre>\n<p>\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306f\uff0c\u30af\u30e9\u30b9\u304b\u3089\u30e2\u30ce\u3092\u65b0\u3057\u304f\u4f5c\u308b\u3068\u304d\u306b\u4e00\u756a\u6700\u521d\u306b\u547c\u3070\u308c\u308b\u30e1\u30bd\u30c3\u30c9\u3067\u3059\uff0e<\/p>\n<p>\u6b63\u76f4\u306a\u8a71\uff0c\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306f\u7121\u304f\u3066\u3082\u826f\u3044\u3067\u3059\u304c\uff0c\u3088\u307b\u3069\u306e\u3053\u3068\u304c\u306a\u3044\u9650\u308a\u4f5c\u3063\u305f\u307b\u3046\u304c\u53ef\u8aad\u6027\u5411\u4e0a\u306b\u3082\u3064\u306a\u304c\u308a\u307e\u3059\uff0e<\/p>\n<p>\u305d\u3057\u3066\uff0c\u30af\u30e9\u30b9\u306f\u3088\u304f\"\u8a2d\u8a08\u56f3\"\u3068\u4f8b\u3048\u3089\u308c\u307e\u3059\u304c\uff0c\u305d\u306e\u8a8d\u8b58\u3067OK\u3067\u3059\uff0e<\/p>\n<p><strong>\u8a2d\u8a08\u56f3\u3092\u3082\u3068\u306b\u30e2\u30ce\u3092\u4f5c\u308b<\/strong>\u3068\u3044\u3046\u3053\u3068\uff0c\u305d\u308c\u304c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u7b2c\u4e00\u6b69\u3067\u3059\uff0e<\/p>\n<ol>\n<li>\u30e1\u30bd\u30c3\u30c9\uff1a\u30af\u30e9\u30b9\u5185\u306b\u5b9a\u7fa9\u3059\u308b\u95a2\u6570\uff08\u30e1\u30f3\u30d0\u95a2\u6570\u3068\u3082\uff09<\/li>\n<li>Docstring\uff1a<span class=\"lang:python decode:true crayon-inline \">\"\"\"<\/span>\u00a0 \u3067\u56f2\u307e\u308c\u305f\u7279\u5225\u306a\u30b3\u30e1\u30f3\u30c8\uff0e\u4e3b\u306b\u95a2\u6570\u306a\u3069\u306e\u5b9a\u7fa9\u304c\u8a18\u8ff0\u3055\u308c\u308b\uff0e<\/li>\n<li><span class=\"lang:python decode:true crayon-inline \">pass<\/span>\u00a0\uff1a\u300c\u4f55\u3082\u3057\u306a\u3044\u300d\u3092\u3059\u308b\u6587\uff0e\u672a\u5b9a\u7fa9\u95a2\u6570\u306a\u3069\u306e\u30a8\u30e9\u30fc\u56de\u907f\u306e\u305f\u3081\u306b\u4f7f\u308f\u308c\u308b\uff0e<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%8B%E3%82%89%E5%91%BC%E3%81%B3%E5%87%BA%E3%81%97%E3%81%A6%E3%81%BF%E3%82%8B\"><\/span>\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u547c\u3073\u51fa\u3057\u3066\u307f\u308b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u305d\u308c\u3067\u306f\u4eca\u4f5c\u3063\u305f\u30af\u30e9\u30b9\u304b\u3089\u30e2\u30ce\u3092\u4f5c\u3063\u3066\u307f\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:python decode:true \" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\"># main.py\r\nfrom robot import Robot  # \u30af\u30e9\u30b9\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\r\n\r\nif __name__ == '__main__':\r\n    robot = Robot()  # \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u751f\u6210\r\n<\/pre>\n<p>\u3053\u306e\u3068\u304d\uff0c\u30af\u30e9\u30b9\u304b\u3089\u4f5c\u6210\u3057\u305f\u5909\u6570(\u30e2\u30ce)\u3092<strong>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9<\/strong>\u3084<strong>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong>\u3068\u547c\u3073\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:sh decode:true\" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\">$ python main.py<\/pre>\n<p>\u3082\u3061\u308d\u3093\uff0c\u30af\u30e9\u30b9\u306b\u306f\u4f55\u3082\u7d30\u304b\u3044\u8a2d\u8a08\u306f\u3057\u3066\u3044\u307e\u305b\u3093\u306e\u3067\u5b9f\u884c\u3057\u3066\u3082\u4f55\u3082\u8d77\u3053\u308a\u307e\u305b\u3093\uff0e<\/p>\n<ol>\n<li><span class=\"lang:python decode:true crayon-inline \">if __name__ == '__main__':<\/span>\u00a0\uff1a\u305d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u5b9f\u884c\u3057\u305f\u6642\u3060\u3051\u547c\u3070\u308c\u308b\uff0c\u8a00\u308f\u3070\u30e1\u30a4\u30f3\u95a2\u6570\u306e\u3088\u3046\u306a\u3082\u306e\uff0e\u7121\u304f\u3066\u3082\u826f\u3044\u304c\u5408\u3063\u305f\u307b\u3046\u304c\u53ef\u8aad\u6027\u306f\u3042\u304c\u308b\uff0e\u597d\u307f\u3084\u6163\u7fd2\u306b\u3088\u308b\uff0e<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"%E3%83%A1%E3%83%B3%E3%83%90%E5%A4%89%E6%95%B0%E3%82%92%E5%AE%9A%E7%BE%A9%E3%81%99%E3%82%8B\"><\/span>\u30e1\u30f3\u30d0\u5909\u6570\u3092\u5b9a\u7fa9\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u6b21\u306b\u30e1\u30f3\u30d0\u5909\u6570\u3092\u5b9a\u7fa9\u3057\u3066\u307f\u307e\u3059\uff0e<\/p>\n<p>\u30e1\u30f3\u30d0\u5909\u6570\u306f\u30d7\u30ed\u30d1\u30c6\u30a3\u306a\u3069\u3068\u3082\u8a00\u308f\u308c\u307e\u3059\u304c\uff0c\u30af\u30e9\u30b9\u306e\u6301\u3064\u8981\u7d20\u3092\u6307\u3057\u307e\u3059\uff0e<\/p>\n<p>\u4eca\u56de\u306eRobot\u30af\u30e9\u30b9\u3067\u3042\u308c\u3070\uff0c\u5927\u304d\u3055\u3084\u540d\u524d\uff0c\u8272\u306a\u3069\uff0c<strong>\u305d\u306e\"\u30e2\u30ce\"\u81ea\u8eab\u304c\u6301\u3064\u7279\u6027<\/strong>\u306a\u3069\u304c\u4e00\u822c\u306b\u5b9a\u7fa9\u3055\u308c\u307e\u3059\uff0e<\/p>\n<p><strong>Python\u3067\u306f\uff0c\u4e00\u822c\u7684\u306b\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u5185\u3067\u5b9a\u7fa9\u3057\u521d\u671f\u5316\u3092\u884c\u3044\u307e\u3059<\/strong>\uff0e<\/p>\n<p>\u3053\u306e\u3068\u304d\uff0c<span class=\"lang:python decode:true crayon-inline \">self<\/span>\u00a0\u3092\u3064\u3051\u3066\u6271\u3044\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:python decode:true \" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\"># robot.py\r\nclass Robot:\r\n    \"\"\"\r\n    Robot \u30af\u30e9\u30b9\r\n    \"\"\"\r\n\r\n    def __init__(self, name, height, color):\r\n        \"\"\"\r\n        \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\r\n        :param name:    \u540d\u524d\r\n        :param height:  \u9ad8\u3055\r\n        :param color:   \u8272\r\n        \"\"\"\r\n        self.name = name\r\n        self.height = height\r\n        self.color = color\r\n<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b<span class=\"lang:python decode:true crayon-inline \">self<\/span>\u00a0\u306e\u6709\u7121\u3067\u5909\u6570\u306f\u5225\u7269\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\uff0e<\/p>\n<p>\u3053\u306e\u5834\u5408\uff0c<strong>\u5f15\u6570\u3068\u3057\u3066\u5404\u30e1\u30f3\u30d0\u5909\u6570\u306e\u521d\u671f\u5024\u3092\u53d7\u3051\u53d6\u308a\uff0c\u30e1\u30f3\u30d0\u5909\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u3054\u304f\u4e00\u822c\u7684\u306a\u8d85\u666e\u901a\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306e\u4f7f\u3044\u65b9<\/strong>\u3067\u3059\uff0e<\/p>\n<p>\u305d\u3046\u3057\u305f\u3089\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u4f5c\u308a\u65b9\u3082\u5909\u3048\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\uff0e<\/p>\n<pre class=\"lang:python decode:true\" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\"># main.py\r\nfrom robot import Robot  # \u30af\u30e9\u30b9\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\r\n\r\nif __name__ == '__main__':\r\n    robot = Robot(\r\n        name='Tanaka',\r\n        height=300,\r\n        color='orange'\r\n    )  # \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u751f\u6210\r\n<\/pre>\n<p><span class=\"lang:python decode:true crayon-inline \">name=<\/span>\u00a0\u306a\u3069\u306f\u9806\u756a\u304c\u5408\u3063\u3066\u3044\u308c\u3070\u7701\u7565\u53ef\u80fd\u3067\u3059\u304c\uff0c\u53ef\u8aad\u6027\u306e\u305f\u3081\u306b\u306a\u308b\u3079\u304f\u8a18\u8ff0\u3059\u308b\u3053\u3068\u304c\u671b\u307e\u3057\u3044\u3067\u3059\uff0e<\/p>\n<p>\u3053\u308c\u3067\uff0c<strong>\u30aa\u30ec\u30f3\u30b8\u8272\u3067300cm\u306e\"Tanaka\"\u3068\u3044\u3046\u30ed\u30dc\u30c3\u30c8<\/strong>\u304c\u751f\u6210\u3055\u308c\u307e\u3057\u305f\uff0e<\/p>\n<p>\u3053\u306e\u3068\u304d\uff0c<strong>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306f\u30af\u30e9\u30b9\u304b\u3089\u305f\u304f\u3055\u3093\u751f\u6210\u3067\u304d\u307e\u3059<\/strong>\uff0e<\/p>\n<p>\u3053\u308c\u304c\uff0c\u30af\u30e9\u30b9\u304c\u8a2d\u8a08\u66f8\u3068\u547c\u3070\u308c\u308b\u6240\u4ee5\u3067\u3059\u306d\uff0e<\/p>\n<pre class=\"lang:python decode:true\" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\"># main.py\r\nfrom robot import Robot  # \u30af\u30e9\u30b9\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\r\n\r\nif __name__ == '__main__':\r\n    robot1 = Robot(\r\n        name='Tanaka',\r\n        height=300,\r\n        color='orange'\r\n    )  # \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u751f\u6210 1\r\n\r\n    robot2 = Robot(\r\n        name='Suzuki',\r\n        height=1500,\r\n        color='pink'\r\n    )  # \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u751f\u6210 2<\/pre>\n<h3><span class=\"ez-toc-section\" id=\"%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89%E3%82%92%E3%82%82%E3%81%A3%E3%81%A8%E4%BD%9C%E3%82%8B\"><\/span>\u30e1\u30bd\u30c3\u30c9\u3092\u3082\u3063\u3068\u4f5c\u308b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u307e\u3060\u3053\u306e\u30ed\u30dc\u30c3\u30c8\u306f\u4f55\u3082\u3067\u304d\u307e\u305b\u3093<\/strong>\uff0e<\/p>\n<p>\u306a\u306e\u3067\u4f55\u304b\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\uff0e<\/p>\n<p>\u4eca\u56de\u306f<\/p>\n<ol>\n<li>\u81ea\u5df1\u7d39\u4ecb<\/li>\n<li>\u8272\u3092\u30e9\u30f3\u30c0\u30e0\u306b\u5909\u3048\u308b<\/li>\n<\/ol>\n<p>\u30e1\u30bd\u30c3\u30c9\u3092\u4f5c\u3063\u3066\u307f\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:python decode:true \" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\"># robot.py\r\nimport random\r\n\r\n\r\nclass Robot:\r\n    \"\"\"\r\n    Robot \u30af\u30e9\u30b9\r\n    \"\"\"\r\n\r\n    def __init__(self, name, height, color):\r\n        \"\"\"\r\n        \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\r\n        :param name:    \u540d\u524d\r\n        :param height:  \u9ad8\u3055\r\n        :param color:   \u8272\r\n        \"\"\"\r\n        self.name = name\r\n        self.height = height\r\n        self.color = color\r\n\r\n    def print_status(self):\r\n        \"\"\"\r\n        \u81ea\u5df1\u7d39\u4ecb\u3059\u308b (\u30c7\u30d0\u30c3\u30b0\u7528\u306e\u51fa\u529b\u95a2\u6570)\r\n        :return:\r\n        \"\"\"\r\n        print('My name is {}'.format(self.name))\r\n        print('I am {}cm tall.'.format(self.height))\r\n        print('My body color is {}.\\n'.format(self.color))\r\n\r\n    def change_color(self):\r\n        \"\"\"\r\n        \u30e9\u30f3\u30c0\u30e0\u306b\u8272\u3092\u5909\u3048\u308b\r\n        :return: \r\n        \"\"\"\r\n        self.color = random.choice(['red', 'blue', 'green', 'orange'])\r\n        print('My body color is changed!\\n')\r\n<\/pre>\n<p>\u305d\u3046\u3057\u305f\u3089\uff0cmain\u5185\u306f\u4ee5\u4e0b\u306e\u8a18\u8ff0\u3060\u3051\u3067OK\u3067\u3059\uff0e<\/p>\n<pre class=\"lang:python decode:true\" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\"># main.py\r\nfrom robot import Robot  # \u30af\u30e9\u30b9\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\r\n\r\nif __name__ == '__main__':\r\n    robot = Robot(\r\n        name='Tanaka',\r\n        height=300,\r\n        color='orange'\r\n    )  # \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u751f\u6210\r\n\r\n    robot.print_status()\r\n    robot.change_color()\r\n    robot.print_status()\r\n<\/pre>\n<pre class=\"lang:sh decode:true\" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\">$ python main.py\r\nMy name is Tanaka\r\nI am 300cm tall.\r\nMy body color is orange.\r\n\r\nMy body color is changed!\r\n\r\nMy name is Tanaka\r\nI am 300cm tall.\r\nMy body color is blue.<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b<strong>\u30e1\u30bd\u30c3\u30c9\u306e\u5b9a\u7fa9\u3092\u3057\u3066\u3057\u307e\u3063\u305f\u3089\uff0c\u3069\u3093\u306a\u306b\u9577\u6587\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3082\uff0c<\/strong><span class=\"lang:python decode:true crayon-inline\">robot.print_status()<\/span><strong>\u00a0\u306e\u3088\u3046\u306b\u3072\u3068\u3064\u547d\u4ee4\u3092\u66f8\u3051\u3070\u6e08\u3080<\/strong>\u306e\u3067\u3059\uff0e<\/p>\n<p>\u3053\u308c\u304c\uff0c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411(\u30af\u30e9\u30b9)\u306e\u6700\u5927\u306e\u91cd\u8981\u8981\u7d20\u3060\u3068\u601d\u3044\u307e\u3059\uff0e<\/p>\n<p>\u305d\u3057\u3066\u3053\u306e\u3088\u3046\u306b\uff0c\u30af\u30e9\u30b9\u3068\u3057\u3066\u30c7\u30fc\u30bf\u3084\u30e1\u30bd\u30c3\u30c9\u3092\u3072\u3068\u307e\u3068\u307e\u308a\u306b\u3057\u3066\u3057\u307e\u3046\u8003\u3048\u3092<strong>\u30ab\u30d7\u30bb\u30eb\u5316<\/strong>\u3068\u8a00\u3044\u307e\u3059\uff0e<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1055\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/06\/2-e1591021564454.png\" alt=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\" width=\"960\" height=\"465\" \/><\/p>\n<p>\u3082\u3046\u4e00\u5ea6\u8a00\u3044\u307e\u3059\u304c\uff0c\u30ab\u30d7\u30bb\u30eb\u5316\u306f<strong>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u8d85\u91cd\u8981\u8981\u7d20<\/strong>\u3067\u3059\uff0e<\/p>\n<p>\u3042\u3068\uff0c\u95a2\u6570\u540d\u306f\u57fa\u672c \"\u52d5\u8a5e\" \u306b\u3057\u307e\u3057\u3087\u3046\u306d\uff0e<\/p>\n<p><span class=\"lang:python decode:true crayon-inline \">do()<\/span>\u00a0\u3068\u304b<span class=\"lang:python decode:true crayon-inline \">do_something()<\/span>\u00a0\u3068\u3044\u3046\u5f62\u304c\u4e00\u822c\u7684\u3067\u3059\uff0e<br \/>\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br \/>\n<ins class=\"adsbygoogle\" style=\"display: block; text-align: center;\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\" data-ad-client=\"ca-pub-7123758399787647\" data-ad-slot=\"1665651601\"><\/ins><br \/>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E3%82%AB%E3%83%97%E3%82%BB%E3%83%AB%E5%8C%96%E3%81%AE%E6%83%85%E5%A0%B1%E9%9A%A0%E8%94%BD%E3%81%AE%E8%A9%B1\"><\/span>\u30ab\u30d7\u30bb\u30eb\u5316\u306e\u60c5\u5831\u96a0\u853d\u306e\u8a71<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u3053\u306e\u30ab\u30d7\u30bb\u30eb\u5316\u306b\u306f\u672c\u6765\uff0c\"<strong>\u60c5\u5831\u96a0\u853d\uff08\u3058\u3087\u3046\u307b\u3046\u3044\u3093\u307a\u3044\uff09<\/strong>\"\u3068\u3044\u3046\u6982\u5ff5\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n<p>\u3053\u308c\u306f\uff0c<strong>\u30af\u30e9\u30b9\u5185\u90e8\u306b\u6301\u3064\u30e1\u30f3\u30d0\u5909\u6570\u306a\u3069\u306f\u5916\u304b\u3089\u7c21\u5358\u306b\u66f8\u304d\u63db\u3048\u3089\u308c\u308b\u72b6\u614b\u3067\u3042\u3063\u3066\u306f\u3044\u3051\u306a\u3044<\/strong>\uff0c\u3068\u3044\u3046\u3082\u306e\uff0e<\/p>\n<p>\u305d\u306e\u8a00\u8449\u306e\u3054\u3068\u304f\u96a0\u3059\u3053\u3068\u3092\u6307\u3057\u307e\u3059\uff0e<\/p>\n<p>\u4f8b\u3048\u3070\uff0c\u30b9\u30de\u30db\u3084\u30c6\u30ec\u30d3\u306b\u3082\u30b7\u30ea\u30a2\u30eb\u756a\u53f7\u306e\u3088\u3046\u306a\uff0c\u5909\u3048\u3089\u308c\u3066\u306f\u3044\u3051\u306a\u3044\u5185\u90e8\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u3042\u308b\u306f\u305a\u3067\u3059\uff0e<\/p>\n<p>\u305d\u308c\u3089\u306f\uff0c\u30e6\u30fc\u30b6\u304b\u3089\u5b89\u6613\u306b\u5909\u66f4\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u306e\u304c\u666e\u901a\u3067\u3059\uff0e<\/p>\n<p>\u3053\u306e<strong>\u60c5\u5831\u96a0\u853d\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u30ab\u30d7\u30bb\u30eb\u5316\u306b\u304a\u3044\u3066\uff0c\u3053\u308c\u307e\u305f\u91cd\u8981\u306a\u8981\u7d20<\/strong>\u3067\u3059\uff0e<\/p>\n<p>Java\u3084C++\u3068\u3044\u3063\u305f\u8a00\u8a9e\u3067\u306f\uff0c\u96a0\u3059\u3082\u306e\u3068\u516c\u958b\u3059\u308b\u3082\u306e\u3092\u305d\u308c\u305e\u308c\uff0cprivate\u3068public\u3067\u5b9a\u7fa9\u3057\u307e\u3059\uff0e<\/p>\n<p>\u304c\uff0c<strong>Python\u306b\u304a\u3044\u3066\u57fa\u672c\u305d\u308c\u3089\u306e\u533a\u5225\u306f\u57fa\u672c\u7684\u306b\u306f\u3042\u308a\u307e\u305b\u3093<\/strong>\uff0e<\/p>\n<p>\u305f\u3060\uff0c\"\u64ec\u4f3c\u7684\u306b\"\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306a\u30e1\u30f3\u30d0\u5909\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u306f\u53ef\u80fd\u3067\u3059\uff0e<\/p>\n<p>\u5148\u307b\u3069\u306eRobot\u30af\u30e9\u30b9\u3067\uff0c\u65b0\u305f\u306b<strong>\u30b7\u30ea\u30a2\u30ebID<\/strong> \u3092\u5b9a\u7fa9\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff0e<\/p>\n<p>\u3053\u308c\u306f\u5916\u90e8\u304b\u3089\u66f8\u304d\u63db\u3048\u3089\u308c\u305f\u3089\u6e9c\u307e\u3063\u305f\u3082\u3093\u3058\u3083\u3042\u308a\u307e\u305b\u3093\uff0e<\/p>\n<p>Python\u3067\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\uff0c\u30a2\u30f3\u30c0\u30fc\u30d0\u30fc\u30922\u3064\u4f7f\u7528\u3057\u3066\u5b9a\u7fa9\u3057\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:python decode:true\" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\"># robot.py\r\nimport random\r\nimport uuid\r\nfrom datetime import datetime\r\n\r\n\r\nclass Robot:\r\n    \"\"\"\r\n    Robot \u30af\u30e9\u30b9\r\n    \"\"\"\r\n\r\n    def __init__(self, name, height, color):\r\n        \"\"\"\r\n        \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\r\n        :param name:    \u540d\u524d\r\n        :param height:  \u9ad8\u3055\r\n        :param color:   \u8272\r\n        \"\"\"\r\n        self.name = name\r\n        self.height = height\r\n        self.color = color\r\n\r\n        # \u65e5\u4ed8\u3092\u3082\u3068\u306b\u30e6\u30cb\u30fc\u30af\u306aID\u3092\u751f\u6210\r\n        self.__id = uuid.uuid5(uuid.NAMESPACE_DNS,\r\n                               datetime.today().strftime('%Y%m%d%H%M%S'))<\/pre>\n<p>\u4eca\u56de\u306f\u5272\u3068\u3057\u3063\u304b\u308a\u76ee\u306b\u30e6\u30cb\u30fc\u30afID\u3092\u751f\u6210\u3057\u3066\u307f\u307e\u3057\u305f\uff0e<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u5b9a\u7fa9\u3059\u308b\u3068\uff0c\u4ee5\u4e0b\u306e\u69d8\u306a\u30a2\u30af\u30bb\u30b9\u306f\u4e0d\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:python decode:true \" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\"># main.py\r\nfrom robot import Robot  # \u30af\u30e9\u30b9\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\r\n\r\nif __name__ == '__main__':\r\n    robot = Robot(\r\n        name='Tanaka',\r\n        height=300,\r\n        color='orange'\r\n    )  # \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u751f\u6210\r\n\r\n    print(robot.name)  # \u3067\u304d\u308b\r\n    print(robot.__id)  # \u3067\u304d\u306a\u3044\r\n<\/pre>\n<pre class=\"lang:python decode:true \" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\">$ python main.py\r\nTanaka\r\nTraceback (most recent call last):\r\n  File \"\/Users\/araki\/PycharmProjects\/samples\/main.py\", line 12, in &lt;module&gt;\r\n    print(robot.__id)  # \u3067\u304d\u306a\u3044\r\nAttributeError: 'Robot' object has no attribute '__id'<\/pre>\n<p>\u3058\u3083\u3042\uff0c<strong>\u5909\u66f4\u306f\u51fa\u6765\u306a\u3044\u306e\u306f\u826f\u3044\u3051\u3069\uff0c\u672c\u5f53\u306b\u305d\u306e\u30c7\u30fc\u30bf\u3092\u53c2\u7167\u3057\u305f\u3044\u3068\u304d\u306f\uff1f<\/strong><\/p>\n<p>\u305d\u3046\u8a00\u3046\u6642\u306f\uff0c<strong>\u30b2\u30c3\u30bf\u30fc(Getter)<\/strong>\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:python mark:33,34 decode:true\" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\"># robot.py\r\nimport random\r\nimport uuid\r\nfrom datetime import datetime\r\n\r\n\r\nclass Robot:\r\n    \"\"\"\r\n    Robot \u30af\u30e9\u30b9\r\n    \"\"\"\r\n\r\n    def __init__(self, name, height, color):\r\n        \"\"\"\r\n        \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\r\n        :param name:    \u540d\u524d\r\n        :param height:  \u9ad8\u3055\r\n        :param color:   \u8272\r\n        \"\"\"\r\n        self.name = name\r\n        self.height = height\r\n        self.color = color\r\n\r\n        # \u65e5\u4ed8\u3092\u3082\u3068\u306b\u30e6\u30cb\u30fc\u30af\u306aID\u3092\u751f\u6210\r\n        self.__id = uuid.uuid5(uuid.NAMESPACE_DNS,\r\n                               datetime.today().strftime('%Y%m%d%H%M%S'))\r\n\r\n    def print_status(self):\r\n        pass\r\n\r\n    def change_color(self):\r\n        pass\r\n\r\n    def get_id(self):\r\n        return self.__id\r\n<\/pre>\n<p>\u305f\u3060\u8fd4\u3059\u3060\u3051\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u3059\uff0e<\/p>\n<pre class=\"lang:python decode:true \" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\"># main.py\r\nfrom robot import Robot  # \u30af\u30e9\u30b9\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\r\n\r\nif __name__ == '__main__':\r\n    robot = Robot(\r\n        name='Tanaka',\r\n        height=300,\r\n        color='orange'\r\n    )  # \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u751f\u6210\r\n\r\n    print(robot.get_id())  # \u3067\u304d\u308b\r\n<\/pre>\n<pre class=\"lang:c++ decode:true \" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\">$ python main.py\r\nf53496fc-4678-5f53-9173-174bf4f0c291<\/pre>\n<p>\u3053\u3046\u3059\u308b\u3053\u3068\u3067\uff0c<strong>\u5909\u66f4\u306f\u8a31\u3055\u308c\u306a\u3044\u3051\u3069\u53d6\u5f97\u306f\u8a31\u3055\u308c\u308b\uff0c\u3044\u308f\u3070\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306a\u30e1\u30f3\u30d0\u5909\u6570\u304c\u5b9a\u7fa9\u3067\u304d\u307e\u3059<\/strong>\uff0e<\/p>\n<p>\u3057\u304b\u3057\uff0c\u3055\u3063\u304d\"\u64ec\u4f3c\u7684\u306b\"\u96a0\u853d\u304c\u53ef\u80fd\u3068\u8a00\u3044\u307e\u3057\u305f\uff0e<\/p>\n<p>\u5b9f\u306f\u3053\u308c\uff0c\u4ee5\u4e0b\u306e\u69d8\u306b\u66f8\u3051\u3070\u30a2\u30af\u30bb\u30b9\u304c\u53ef\u80fd\u306a\u306e\u3067\u3059\uff0e<\/p>\n<pre class=\"lang:python decode:true\" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\"># main.py\r\nfrom robot import Robot  # \u30af\u30e9\u30b9\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\r\n\r\nif __name__ == '__main__':\r\n    robot = Robot(\r\n        name='Tanaka',\r\n        height=300,\r\n        color='orange'\r\n    )  # \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u751f\u6210\r\n\r\n    print(robot.get_id())  # \u3067\u304d\u308b\r\n    print(robot._Robot__id)  # Getter\u3092\u901a\u3055\u305a\u3068\u3082\u3067\u304d\u3061\u3083\u3046\r\n<\/pre>\n<p><span class=\"lang:c++ decode:true crayon-inline \">\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9._\u30af\u30e9\u30b9__\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30e1\u30f3\u30d0\u5909\u6570<\/span>\u00a0\u3068\u3044\u3046\u5f62\u3067\u3059\u306d\uff0e<\/p>\n<p>\u3053\u308c\u306f\uff0c\u6697\u9ed9\u306e\u4e86\u89e3\u3068\u3057\u3066\u300c\u3084\u3063\u3066\u306f\u3044\u3051\u306a\u3044\u300d\u3068\u306f\u306a\u3063\u3066\u3044\u307e\u3059\u304c\uff0c\u8a70\u307e\u308b\u3068\u3053\u308d<strong>Python\u3067\u306f\u5b8c\u5168\u306a\u60c5\u5831\u96a0\u853d\u306f\u3067\u304d\u307e\u305b\u3093<\/strong>\uff0e<\/p>\n<p>\u3068\u3044\u3046\u304bPython\u3067\u306f\u5b9f\u969b\u3053\u306e\u3088\u3046\u306b\u3057\u3066\u60c5\u5831\u3092\u96a0\u3059\u3053\u3068\u306f\u3042\u307e\u308a\u3057\u307e\u305b\u3093\uff0e<\/p>\n<p>Python\u306f\u7d33\u58eb\u306e\u8a00\u8a9e\u306a\u306e\u3067\u6697\u9ed9\u306e\u4e86\u89e3\u3067\u3069\u3046\u306b\u304b\u306a\u308b\u306e\u3067\u3059\uff0e\uff08\uff1f\uff09<\/p>\n<p><strong>\u3067\u3059\u304c\uff0cJava\u3084C++\u3067\u306f\u30e1\u30f3\u30d0\u5909\u6570\u306f\u57fa\u672cprivate\u3067\u3059<\/strong>\uff0e<\/p>\n<p>\u3067\u3059\u306e\u3067\uff0cPython\u3092\u4f7f\u3063\u3066\u3044\u3066\u3082\u982d\u306e\u7247\u9685\u306b\u306f\uff0c\u300c\u30e1\u30f3\u30d0\u5909\u6570\u306f\u57fa\u672c\u96a0\u853d\u3059\u308b\u3082\u3093\u306a\u3093\u3060\u306a\u300d\u3068\u899a\u3048\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\uff0e<\/p>\n<p><del>\u3076\u3063\u3061\u3083\u3051\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3092\u5b8c\u74a7\u306b\u5b66\u3073\u305f\u3051\u308c\u3070Python\u3058\u3083\u306a\u304f\u3066\u4ed6\u306e\u8a00\u8a9e\u306e\u307b\u3046\u304c\u826f\u304f\u306d\uff1f<\/del><\/p>\n<p>\u3053\u3053\u307e\u3067\u304c\uff0c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306e\u4e00\u756a\u5927\u4e8b\u306a\u8981\u7d20\u30ab\u30d7\u30bb\u30eb\u5316\u306e\u8a71\u3067\u3057\u305f\uff0e<\/p>\n<p>\u307e\u3068\u3081\u308b\u3068<\/p>\n<ol>\n<li>\u30ab\u30d7\u30bb\u30eb\u5316\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u306b\u304a\u3044\u3066\u4e00\u756a\u5927\u4e8b\u306a\u8981\u7d20<\/li>\n<li>\u30af\u30e9\u30b9\u8a2d\u8a08\u2252\u30ab\u30d7\u30bb\u30eb\u5316<\/li>\n<li>\u66f8\u304d\u63db\u3048\u304c\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u306b\u306f\u60c5\u5831\u3092\u96a0\u853d\u3059\u308b<\/li>\n<li>Python\u306f\u4f8b\u5916\u3067\u4ed6\u306eJava\u3084C++\u3067\u306f\uff0c\u30e1\u30f3\u30d0\u5909\u6570\u306f\u57fa\u672cPrivate<\/li>\n<\/ol>\n<h2><span class=\"ez-toc-section\" id=\"%E7%B6%99%E6%89%BF%E3%81%A8%E3%83%9D%E3%83%AA%E3%83%A2%E3%83%BC%E3%83%95%E3%82%A3%E3%82%BA%E3%83%A0%E3%81%AE%E8%A9%B1\"><\/span>\u7d99\u627f\u3068\u30dd\u30ea\u30e2\u30fc\u30d5\u30a3\u30ba\u30e0\u306e\u8a71<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u6700\u5f8c\u306b\u7d99\u627f\u3068\u30dd\u30ea\u30e2\u30fc\u30d5\u30a3\u30ba\u30e0\u306b\u3064\u3044\u3066\u8efd\u304f\u89e6\u308c\u307e\u3059\uff0e<\/p>\n<p>\u3055\u3063\u304d\u307f\u305f\u3044\u306b\u8a73\u7d30\u306b\u306f\u89e3\u8aac\u3057\u307e\u305b\u3093\uff0e<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E7%B6%99%E6%89%BF\"><\/span>\u7d99\u627f<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1061\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/06\/3-e1591060755830.png\" alt=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\" width=\"960\" height=\"485\" \/><\/p>\n<p>\u7d99\u627f\u306f\uff0c<strong>\u4f5c\u3063\u305f\u30af\u30e9\u30b9(\u89aa\u30af\u30e9\u30b9)\u3092\u3082\u3068\u306b\u65b0\u3057\u3044\u30af\u30e9\u30b9(\u5c0f\u30af\u30e9\u30b9)\u3092\u751f\u6210\u3059\u308b\u3053\u3068<\/strong>\u3092\u6307\u3057\u307e\u3059\uff0e<\/p>\n<p>\u30af\u30e9\u30b9\u306f\u96c6\u5408\u306e\u3088\u3046\u306a\u3082\u306e\u3067\uff0c\u4eca\u50d5\u3089\u304c\u4f5c\u3063\u305f\u3082\u306e\u306fRobot\u30af\u30e9\u30b9\u3067\u3042\u308a\uff0cRobot\u3068\u3044\u3046\u540d\u524d\u306e\u96c6\u5408\u3092\u4f5c\u308a\u307e\u3057\u305f\uff0e<\/p>\n<p>\u305d\u308c\u3092\u7d99\u627f\u3057\u3066\uff0cGundam\u30af\u30e9\u30b9\u3092\u4f5c\u308c\u3070\u5f15\u304d\u7d99\u3052\u308b\u3082\u306e\u304c\u591a\u304f\uff0c\u30af\u30e9\u30b9\u8a2d\u8a08\u306e\u624b\u9593\u3092\u7701\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\uff0e<\/p>\n<p>\u3053\u308c\u304c\u7d99\u627f\u306e\u8003\u3048\u65b9\u3067\u3059\uff0e<\/p>\n<p>Python\u3067\u3082\u30af\u30e9\u30b9\u306e\u7d99\u627f\u304c\u53ef\u80fd\u3067\u3059\uff0e<\/p>\n<pre class=\"lang:python decode:true \" title=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\">class Gundam(Robot):\r\n    \"\"\"\r\n    Gundam\u30af\u30e9\u30b9\r\n    \u7b46\u8005\u306f\u30ac\u30f3\u30c0\u30e0\u8a73\u3057\u304f\u306a\u3044\r\n    \"\"\"\r\n    def __init__(self, name, height, color):\r\n        super().__init__(name, height, color)\r\n        \r\n        # \u52a0\u3048\u3066Gundam\u30af\u30e9\u30b9\u7279\u6709\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3092\u5b9a\u7fa9\u53ef\u80fd\r\n        pass<\/pre>\n<p>\u3082\u3061\u308d\u3093\u3053\u306eGundam\u30af\u30e9\u30b9\u3092\u89aa\u306b\u3057\u3066\uff0c\u307e\u305f\u5c0f\u30af\u30e9\u30b9\u3082\u751f\u6210\u53ef\u80fd\u3067\u3059\uff0e<\/p>\n<p>\u5927\u4e8b\u306a\u306e\u306f\uff0c<strong>\u300c\u5c0f\u30af\u30e9\u30b9 is a \u89aa\u30af\u30e9\u30b9\u300d\u306e\u95a2\u4fc2<\/strong>\u3067\u3059\uff0e<\/p>\n<p>\u53cd\u5bfe\u306f\u6210\u308a\u7acb\u3061\u307e\u305b\u3093\uff0e<\/p>\n<p>Gundam is a Robot \u306a\u306e\u3067\u3042\u3063\u3066\uff0cRobot is a Gundam\u3067\u306f\u3042\u308a\u307e\u305b\u3093\uff0e<\/p>\n<p>\u3042\u3068\uff0c\u3061\u306a\u307f\u306b<strong>\u5c0f\u30af\u30e9\u30b9\u304b\u3089\u89aa\u30af\u30e9\u30b9\u306e\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u5909\u6570\u306b\u306f\u30a2\u30af\u30bb\u30b9\u4e0d\u53ef<\/strong>\u3067\u3059\uff0e<\/p>\n<p>\u53c2\u8003\u307e\u3067\u306b\uff0c\u5c0f\u30af\u30e9\u30b9\u304b\u3089\u3082\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3051\u308c\u3070\uff0cJava\u3084C++\u3067\u306f\u304b\u308f\u308a\u306bprotected\u3068\u3044\u3046\u6307\u5b9a\u5b50\u3092\u3064\u3051\u307e\u3059\uff0e<\/p>\n<p>\u3084\u306f\u308aPython\u3067\u306f\u30e1\u30f3\u30d0\u5909\u6570\u306f\u57fa\u672cpublic\u306a\u3082\u306e\u3067\u826f\u3044\u3067\u3057\u3087\u3046\uff0e<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E3%83%9D%E3%83%AA%E3%83%A2%E3%83%BC%E3%83%95%E3%82%A3%E3%82%BA%E3%83%A0\"><\/span>\u30dd\u30ea\u30e2\u30fc\u30d5\u30a3\u30ba\u30e0<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1060\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/06\/4-e1591060699541.png\" alt=\"Python\u3067\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\" width=\"960\" height=\"485\" \/><\/p>\n<p>\u30dd\u30ea\u30e2\u30fc\u30d5\u30a3\u30ba\u30e0\u306f\u65e5\u672c\u8a9e\u3067\u306f\u591a\u69d8\u6027\u306a\u3069\u3068\u8a33\u3055\u308c\u307e\u3059\uff0e<\/p>\n<p>\u30dd\u30ea\u30e2\u30fc\u30d5\u30a3\u30ba\u30e0\u3068\u306f\u62bd\u8c61\u5316\u3067\u3042\u308a\uff0c\u91cd\u8981\u306a\u306e\u306f<strong>\u3044\u304b\u306b\u89aa\u30af\u30e9\u30b9\u304b\u3089\u591a\u69d8\u6027\u3092\u6301\u3063\u3066\u7d99\u627f\u3067\u304d\u308b\u304b<\/strong>\u3067\u3059\uff0e<\/p>\n<p>\u7d99\u627f\u3068\u30dd\u30ea\u30e2\u30fc\u30d5\u30a3\u30ba\u30e0\u306f\u5bc6\u63a5\u306a\u95a2\u4fc2\u306b\u3042\u308a\u307e\u3059\uff0e<\/p>\n<p>\u4eca\u56deRobot\u30af\u30e9\u30b9\u3092\u4f5c\u308a\u307e\u3057\u305f\u304c\uff0c\u3068\u3066\u3082<strong>\u62bd\u8c61\u7684\u306a\u30af\u30e9\u30b9<\/strong>\u3067\u3059\uff0e<\/p>\n<p>\u4f8b\u3048\u3070\uff0cRobot\u30af\u30e9\u30b9\u306b<span class=\"lang:python decode:true crayon-inline\">walk()<\/span>\u00a0\u30e1\u30bd\u30c3\u30c9\u3092\u4f5c\u3063\u305f\u3068\u3057\u307e\u3057\u3087\u3046\uff0e<\/p>\n<p>\u3067\u3059\u304c\u30ed\u30dc\u30c3\u30c8\u3068\u3044\u3048\u3069\uff0c\u30c9\u30e9\u3048\u3082\u3093\u306e\u3088\u3046\u306b\u4e8c\u8db3\u6b69\u884c\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3057\uff0c\u30eb\u30f3\u30d0\u306e\u3088\u3046\u306b\u8eca\u8f2a\u578b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\uff0e<\/p>\n<p>\u3053\u308c\u3067\u306f\uff0c\u3053\u306eRobot\u30af\u30e9\u30b9\u304b\u3089Roomba\u30af\u30e9\u30b9\u306f\u4f5c\u308c\u307e\u305b\u3093\uff0e(\u5b9f\u969b\u4f5c\u308c\u308b\u3051\u3069)<\/p>\n<p>\u306a\u306e\u3067\uff0c<span class=\"lang:python decode:true crayon-inline\">walk()<\/span>\u00a0\u3067\u306f\u306a\u304f<span class=\"lang:python decode:true crayon-inline \">move()<\/span>\u00a0\u306e\u3088\u3046\u306a\u62bd\u8c61\u7684\u306a\u540d\u524d\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u3057\u307e\u3057\u3087\u3046\uff0c\u3068\u3044\u3046\u3053\u3068\u3067\u3059\uff0e<\/p>\n<p><strong>\u62bd\u8c61\u5316\u3059\u308b\u3053\u3068\u3067\u591a\u69d8\u6027\u306b\u3064\u306a\u304c\u308a\u307e\u3059<\/strong>\uff0e<\/p>\n<p>\u6b63\u76f4\u306a\u8a71\uff0c\u4e00\u4eba\u3067\u958b\u767a\u3057\u3066\u3044\u308b\u5206\u306b\u306f\u3042\u307e\u308a\u7e01\u304c\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\uff0e<\/p>\n<p>\u3067\u3059\u306e\u3067\uff0c\u4e00\u4eba\u3067\u958b\u767a\u3057\u3066\u3044\u308b\u306e\u306a\u3089\u3070\uff0c<strong>\u3068\u308a\u3042\u3048\u305a\u30ab\u30d7\u30bb\u30eb\u5316\u3092\u8eab\u306b\u4ed8\u3051\u308b\u306e\u304c\u826f\u3044<\/strong>\u3067\u3057\u3087\u3046\uff01<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E3%81%8A%E3%82%8F%E3%82%8A%E3%81%AB\"><\/span>\u304a\u308f\u308a\u306b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u9577\u304f\u306a\u3063\u3066\u3057\u307e\u3057\u307e\u3057\u305f\u304c\uff0c<strong>Python\u3067\u3056\u3063\u304f\u308a\u7406\u89e3\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411<\/strong>\u3067\u3057\u305f\uff0e<\/p>\n<p>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u304c\u308f\u304b\u308b\u3068\uff0c\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u304c\u697d\u3057\u304f\u306a\u308a\u307e\u3059\uff0e<\/p>\n<p>\u4ed6\u4eba\u304c\u66f8\u3044\u305f\u30b3\u30fc\u30c9\u3092\u3059\u3050\u306b\u7406\u89e3\u3067\u304d\u308b\u69d8\u306b\u306a\u308a\u307e\u3059\uff0e<\/p>\n<p>\u306a\u306e\u3067\uff0c\u3053\u308c\u3092\u6a5f\u306b\u624b\u3092\u52d5\u304b\u3057\u306a\u304c\u3089\u3057\u3063\u304b\u308a\u3068\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3092\u7406\u89e3\u3057\u3066\u304f\u3060\u3055\u3044\uff0e<\/p>\n<p>\u305d\u3046\u305d\u3046\uff0c\u4ed6\u4eba\u306e\u66f8\u3044\u305f\u30b3\u30fc\u30c9\u3092\u8aad\u3080\u3053\u3068\u3082\u826f\u3044\u52c9\u5f37\u306b\u306a\u308b\u306e\u3067\u304a\u3059\u3059\u3081\u3067\u3059\uff0e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u521d\u5fc3\u8005\u30d7\u30ed\u30b0\u30e9\u30de\u306f\u3060\u3044\u305f\u3044\u306f\u540c\u3058\u3068\u3053\u308d\u3067\u3064\u307e\u305a\u304d\u307e\u3059\uff0e\u305d\u308c\u306f\u30af\u30e9\u30b9\u3068\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3067\u3059\uff0e\u3053\u306e\u300c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u300d\u3068\u3044\u3046\u8003\u3048\u65b9\u306f\uff0c\u30d7\u30ed\u30b0\u30e9\u30de\u521d\u5b66\u8005\u306b\u3068\u3063\u3066\u5b9f\u614b\u304c\u308f\u304b\u3089\u305a\u5927\u304d\u306a\u58c1\u306b\u306a\u308a\u304c\u3061\u3067\u3059\uff0e\u305d\u3053\u3067\uff0c\u3053\u306e\u8a18\u4e8b\u3067\u306fPython\u3092\u901a\u3057\u3066\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u3068\u306f\u4f55\u304b\u3092 \"\u3056\u3063\u304f\u308a\" \u3068\u7406\u89e3\u3067\u304d\u308b\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u3066\u3044\u307e\u3059\uff0e<\/p>\n","protected":false},"author":1,"featured_media":1064,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[50,77],"_links":{"self":[{"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/posts\/1041"}],"collection":[{"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/comments?post=1041"}],"version-history":[{"count":19,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/posts\/1041\/revisions"}],"predecessor-version":[{"id":1068,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/posts\/1041\/revisions\/1068"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/media\/1064"}],"wp:attachment":[{"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/media?parent=1041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/categories?post=1041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/tags?post=1041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}