{"id":5460,"date":"2022-04-02T21:22:57","date_gmt":"2022-04-02T13:22:57","guid":{"rendered":"https:\/\/egonlin.com\/?p=5460"},"modified":"2022-04-02T21:22:57","modified_gmt":"2022-04-02T13:22:57","slug":"04-03-%e8%ba%ab%e4%bd%93%e8%b4%a8%e9%87%8f%e6%8c%87%e6%95%b0bmi%e9%97%ae%e9%a2%98%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"https:\/\/egonlin.com\/?p=5460","title":{"rendered":"04-03 \u8eab\u4f53\u8d28\u91cf\u6307\u6570BMI\u95ee\u9898\u5206\u6790"},"content":{"rendered":"<h1>\u4e00\u3001&quot;\u8eab\u4f53\u8d28\u91cf\u6307\u6570BMI&quot;\u95ee\u9898\u5206\u6790<\/h1>\n<h2>1.1 \u8eab\u4f53\u8d28\u91cf\u6307\u6570BMI<\/h2>\n<p>BMI\uff1a\u5bf9\u8eab\u4f53\u8d28\u91cf\u7684\u523b\u753b<\/p>\n<ul>\n<li>BMI\uff1aBody Mass Index\uff1a\u56fd\u9645\u4e0a\u5e38\u7528\u7684\u8861\u91cf\u4eba\u4f53\u80a5\u80d6\u548c\u5065\u5eb7\u7a0b\u5ea6\u7684\u91cd\u8981\u6807\u51c6\uff0c\u4e3b\u8981\u7528\u4e8e\u7edf\u8ba1\u5206\u6790<\/li>\n<li>\u5b9a\u4e49\uff1a???=\u4f53\u91cd(??)\/\u8eab\u9ad82(?2)BMI=\u4f53\u91cd(kg)\/\u8eab\u9ad82(m2)<\/li>\n<li>\u5b9e\u4f8b\uff1a\u4f53\u91cd 72 kg\uff0c\u8eab\u9ad8 1.75 m\n<ul>\n<li>BMI \u503c\u662f 23.5<\/li>\n<\/ul>\n<\/li>\n<li>\u8fd9\u4e2a\u503c\u662f\u5426\u5065\u5eb7\u5462\uff1f<\/li>\n<\/ul>\n<p>\u56fd\u9645\uff1a\u4e16\u754c\u536b\u751f\u7ec4\u7ec7 \u56fd\u5185\uff1a\u56fd\u5bb6\u536b\u751f\u5065\u5eb7\u59d4\u5458\u4f1a<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: center;\">\u5206\u7c7b<\/th>\n<th style=\"text-align: center;\">\u56fd\u9645BMI\u503c(??\/?2)(kg\/m2)<\/th>\n<th style=\"text-align: center;\">\u56fd\u5185BMI\u503c(??\/?2)(kg\/m2)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: center;\">\u504f\u7626<\/td>\n<td style=\"text-align: center;\">&lt;18.5<\/td>\n<td style=\"text-align: center;\">&lt;18.5<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">\u6b63\u5e38<\/td>\n<td style=\"text-align: center;\">18.5 ~ 25<\/td>\n<td style=\"text-align: center;\">18.5 ~ 24<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">\u504f\u80d6<\/td>\n<td style=\"text-align: center;\">25 ~ 30<\/td>\n<td style=\"text-align: center;\">24 ~ 28<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">\u80a5\u80d6<\/td>\n<td style=\"text-align: center;\">\u226530<\/td>\n<td style=\"text-align: center;\">\u226528<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>1.2 \u95ee\u9898\u9700\u6c42<\/h2>\n<p>-\u8f93\u5165\uff1a\u7ed9\u5b9a\u4f53\u91cd\u548c\u8eab\u9ad8\u503c<br \/>\n-\u8f93\u51fa\uff1aBMI\u6307\u6807\u5206\u7c7b\u4fe1\u606f(\u56fd\u9645\u548c\u56fd\u5185)<\/p>\n<h1>\u4e8c\u3001&quot;\u8eab\u4f53\u8d28\u91cf\u6307\u6570BMI&quot;\u5b9e\u4f8b\u8bb2\u89e3<\/h1>\n<h2>2.1 \u8eab\u4f53\u8d28\u91cf\u6307\u6807BMI<\/h2>\n<p>\u601d\u8def\u65b9\u6cd5<\/p>\n<ul>\n<li>\u96be\u70b9\u5728\u4e8e\u540c\u65f6\u8f93\u51fa\u56fd\u9645\u548c\u56fd\u5185\u5bf9\u5e94\u7684\u5206\u7c7b<\/li>\n<li>\u601d\u8def1\uff1a\u5206\u522b\u8ba1\u7b97\u5e76\u7ed9\u51fa\u56fd\u9645\u548c\u56fd\u5185BMI\u5206\u7c7b<\/li>\n<li>\u601d\u8def2\uff1a\u6df7\u5408\u8ba1\u7b97\u5e76\u7ed9\u51fa\u56fd\u9645\u548c\u56fd\u5185BMI\u5206\u7c7b<\/li>\n<\/ul>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: center;\">\u5206\u7c7b<\/th>\n<th style=\"text-align: center;\">\u56fd\u9645BMI\u503c(??\/?2)(kg\/m2)<\/th>\n<th style=\"text-align: center;\">\u56fd\u5185BMI\u503c(??\/?2)(kg\/m2)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: center;\">\u504f\u7626<\/td>\n<td style=\"text-align: center;\">&lt;18.5<\/td>\n<td style=\"text-align: center;\">&lt;18.5<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">\u6b63\u5e38<\/td>\n<td style=\"text-align: center;\">18.5 ~ 25<\/td>\n<td style=\"text-align: center;\">18.5 ~ 24<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">\u504f\u80d6<\/td>\n<td style=\"text-align: center;\">25 ~ 30<\/td>\n<td style=\"text-align: center;\">24 ~ 28<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">\u80a5\u80d6<\/td>\n<td style=\"text-align: center;\">\u226530<\/td>\n<td style=\"text-align: center;\">\u226528<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>2.1.1 \u56fd\u9645<\/h3>\n<pre><code class=\"language-python\"># CalBMIv1.py\n\nheight, weight = eval(input(&quot;\u8bf7\u8f93\u5165\u8eab\u9ad8(\u7c73)\u548c\u4f53\u91cd\\(\u516c\u65a4)[\u9017\u53f7\u9694\u5f00]: &quot;))\nbmi = weight \/ pow(height, 2)\nprint(&quot;BMI \u6570\u503c\u4e3a\uff1a{:.2f}&quot;.format(bmi))\n\nwho = &quot;&quot;\nif bmi &lt; 18.5:\n    who = &quot;\u504f\u7626&quot;\nelif 18.5 &lt;= bmi &lt; 25:\n    who = &quot;\u6b63\u5e38&quot;\nelif 25 &lt;= bmi &lt; 30:\n    who = &quot;\u504f\u80d6&quot;\nprint(&quot;BMI \u6307\u6807\u4e3a:\u56fd\u9645&#039;{0}&#039;&quot;.format(who))<\/code><\/pre>\n<h3>2.1.2 \u56fd\u5185<\/h3>\n<pre><code class=\"language-python\"># CalBMIv2.py\n\nheight, weight = eval(input(&quot;\u8bf7\u8f93\u5165\u8eab\u9ad8(\u7c73)\u548c\u4f53\u91cd\\(\u516c\u65a4)[\u9017\u53f7\u9694\u5f00]: &quot;))\nbmi = weight \/ pow(height, 2)\nprint(&quot;BMI \u6570\u503c\u4e3a\uff1a{:.2f}&quot;.format(bmi))\n\nnat = &quot;&quot;\nif bmi &lt; 18.5:\n    nat = &quot;\u504f\u7626&quot;\nelif 18.5 &lt;= bmi &lt; 24:\n    nat = &quot;\u6b63\u5e38&quot;\nelif 25 &lt;= bmi &lt; 38:\n    nat = &quot;\u504f\u80d6&quot;\nprint(&quot;BMI \u6307\u6807\u4e3a:\u56fd\u5185&#039;{0}&#039;&quot;.format(nat))\n\n\u8bf7\u8f93\u5165\u8eab\u9ad8(\u7c73)\u548c\u4f53\u91cd\\(\u516c\u65a4)[\u9017\u53f7\u9694\u5f00]: 1.8,70\nBMI \u6570\u503c\u4e3a\uff1a21.60\nBMI \u6307\u6807\u4e3a:\u56fd\u5185&#039;\u6b63\u5e38&#039;<\/code><\/pre>\n<pre><code class=\"language-python\"># CalBMIv3.py\n\nheight, weight = eval(input(&quot;\u8bf7\u8f93\u5165\u8eab\u9ad8(\u7c73)\u548c\u4f53\u91cd\\(\u516c\u65a4)[\u9017\u53f7\u9694\u5f00]: &quot;))\nbmi = weight \/ pow(height, 2)\nprint(&quot;BMI \u6570\u503c\u4e3a\uff1a{:.2f}&quot;.format(bmi))\nwho, nat = &quot;&quot;, &quot;&quot;\nif bmi &lt; 18.5:\n    who, nat = &quot;\u504f\u7626&quot;, &quot;\u504f\u7626&quot;\nelif 18.5 &lt;= bmi &lt; 24:\n    who, nat = &quot;\u6b63\u5e38&quot;, &quot;\u6b63\u5e38&quot;\nelif 24 &lt;= bmi &lt; 25:\n    who, nat = &quot;\u6b63\u5e38&quot;, &quot;\u504f\u80d6&quot;\nelif 25 &lt;= bmi &lt; 28:\n    who, nat = &quot;\u504f\u80d6&quot;, &quot;\u504f\u80d6&quot;\nelif 28 &lt;= bmi &lt; 30:\n    who, nat = &quot;\u504f\u80d6&quot;, &quot;\u80a5\u80d6&quot;\nelse:\n    who, nat = &quot;\u80a5\u80d6&quot;, &quot;\u80a5\u80d6&quot;\nprint(&quot;BMI \u6307\u6807\u4e3a:\u56fd\u9645&#039;{0}&#039;, \u56fd\u5185&#039;{1}&#039;&quot;.format(who, nat))\n1\n\n\u8bf7\u8f93\u5165\u8eab\u9ad8(\u7c73)\u548c\u4f53\u91cd\\(\u516c\u65a4)[\u9017\u53f7\u9694\u5f00]: 1.8,70\nBMI \u6570\u503c\u4e3a\uff1a21.60\nBMI \u6307\u6807\u4e3a:\u56fd\u9645&#039;\u6b63\u5e38&#039;, \u56fd\u5185&#039;\u6b63\u5e38&#039;<\/code><\/pre>\n<h1>\u4e09\u3001&quot;\u8eab\u4f53\u8d28\u91cf\u6307\u6570BMI&quot;\u4e3e\u4e00\u53cd\u4e09<\/h1>\n<p>\u5173\u6ce8\u591a\u5206\u652f\u6761\u4ef6\u7684\u7ec4\u5408<\/p>\n<ul>\n<li>\u591a\u5206\u652f\u6761\u4ef6\u4e4b\u95f4\u7684\u8986\u76d6\u662f\u91cd\u8981\u95ee\u9898<\/li>\n<li>\u7a0b\u5e8f\u53ef\u8fd0\u884c\uff0c\u4f46\u4e0d\u6b63\u786e\uff0c\u8981\u6ce8\u610f\u591a\u5206\u652f<\/li>\n<li>\u5206\u652f\u7ed3\u6784\u662f\u7a0b\u5e8f\u7684\u91cd\u8981\u6846\u67b6\uff0c\u8bfb\u7a0b\u5e8f\u5148\u770b\u5206\u652f<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001&quot;\u8eab\u4f53\u8d28\u91cf\u6307\u6570BMI&quot;\u95ee\u9898\u5206\u6790 1.1 \u8eab\u4f53\u8d28\u91cf\u6307\u6570BMI BMI\uff1a\u5bf9\u8eab\u4f53\u8d28\u91cf\u7684\u523b\u753b  [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":5427,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[371,375],"tags":[],"_links":{"self":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/5460"}],"collection":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5460"}],"version-history":[{"count":0,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/5460\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/media\/5427"}],"wp:attachment":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}