{"id":5544,"date":"2022-04-02T21:56:56","date_gmt":"2022-04-02T13:56:56","guid":{"rendered":"https:\/\/egonlin.com\/?p=5544"},"modified":"2022-04-02T21:56:56","modified_gmt":"2022-04-02T13:56:56","slug":"01-03-%e5%ae%9e%e4%be%8b1-%e6%b8%a9%e5%ba%a6%e8%bd%ac%e6%8d%a2","status":"publish","type":"post","link":"https:\/\/egonlin.com\/?p=5544","title":{"rendered":"01-03 \u5b9e\u4f8b1-\u6e29\u5ea6\u8f6c\u6362"},"content":{"rendered":"<h1>\u4e00\u3001&quot;\u6e29\u5ea6\u8f6c\u6362&quot;\u95ee\u9898\u5206\u6790<\/h1>\n<h2>1.1 \u6e29\u5ea6\u8f6c\u6362<\/h2>\n<p>\u6e29\u5ea6\u523b\u753b\u7684\u4e24\u79cd\u4e0d\u540c\u4f53\u7cfb<\/p>\n<ul>\n<li>\u6444\u6c0f\u5ea6\uff1a\u4e2d\u56fd\u7b49\u4e16\u754c\u5927\u591a\u6570\u56fd\u5bb6\u4f7f\u7528\n<ul>\n<li>\u4ee51\u6807\u51c6\u5927\u6c14\u538b\u4e0b\u6c34\u7684\u7ed3\u51b0\u70b9\u4e3a0\u5ea6\uff0c\u6cb8\u70b9\u4e3a100\u5ea6\uff0c\u5c06\u6e29\u5ea6\u8fdb\u884c\u7b49\u5206\u523b\u753b<\/li>\n<\/ul>\n<\/li>\n<li>\u534e\u6c0f\u5ea6\uff1a\u7f8e\u56fd\u3001\u82f1\u56fd\u7b49\u56fd\u5bb6\u4f7f\u7528\n<ul>\n<li>\u4ee51\u6807\u51c6\u5927\u6c14\u538b\u4e0b\u6c34\u7684\u7ed3\u51b0\u70b9\u4e3a32\u5ea6\uff0c\u6cb8\u70b9\u4e3a212\u5ea6\uff0c\u5c06\u6e29\u5ea6\u8fdb\u884c\u7b49\u5206\u523b\u753b<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>1.2 \u9700\u6c42\u5206\u6790<\/h2>\n<p>\u4e24\u79cd\u6e29\u5ea6\u4f53\u7cfb\u7684\u8f6c\u6362<\/p>\n<ul>\n<li>\u6444\u6c0f\u5ea6\u8f6c\u6362\u4e3a\u534e\u6c0f\u5ea6<\/li>\n<li>\u534e\u6c0f\u5ea6\u8f6c\u6362\u4e3a\u6444\u6c0f\u5ea6<\/li>\n<\/ul>\n<h2>1.3 \u95ee\u9898\u5206\u6790<\/h2>\n<p>\u8be5\u95ee\u9898\u4e2d\u8ba1\u7b97\u90e8\u5206\u7684\u7406\u89e3\u548c\u786e\u5b9a<\/p>\n<ul>\n<li>\u7406\u89e31\uff1a\u76f4\u63a5\u5c06\u6e29\u5ea6\u503c\u8fdb\u884c\u8f6c\u6362<\/li>\n<li>\u7406\u89e32\uff1a\u5c06\u6e29\u5ea6\u4fe1\u606f\u53d1\u5e03\u7684\u58f0\u97f3\u6216\u56fe\u50cf\u5f62\u5f0f\u8fdb\u884c\u7406\u89e3\u548c\u8f6c\u6362<\/li>\n<li>\u7406\u89e33\uff1a\u76d1\u63a7\u6e29\u5ea6\u4fe1\u606f\u53d1\u5e03\u6e20\u9053\uff0c\u5b9e\u65f6\u83b7\u53d6\u5e76\u8f6c\u6362\u6e29\u5ea6\u503c<\/li>\n<\/ul>\n<h3>1.3.1 \u5206\u6790\u95ee\u9898<\/h3>\n<ul>\n<li>\u91c7\u7528 \u7406\u89e31\uff1a\u76f4\u63a5\u5c06\u6e29\u5ea6\u503c\u8fdb\u884c\u8f6c\u6362\n<ul>\n<li>\u6e29\u5ea6\u6570\u503c\u9700\u8981\u6807\u660e\u6e29\u5ea6\u4f53\u7cfb\uff0c\u5373\u6444\u6c0f\u5ea6\u6216\u534e\u6c0f\u5ea6<\/li>\n<li>\u8f6c\u6362\u540e\u4e5f\u9700\u8981\u7ed9\u51fa\u6e29\u5ea6\u4f53\u7cfb<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>1.3.2 \u5212\u5206\u8fb9\u754c<\/h3>\n<ul>\n<li>\u8f93\u5165\uff1a\u5e26\u534e\u6c0f\u6216\u6444\u6c0f\u6807\u5fd7\u7684\u6e29\u5ea6\u503c<\/li>\n<li>\u5904\u7406\uff1a\u6839\u636e\u6e29\u5ea6\u6807\u5fd7\u9009\u62e9\u9002\u5f53\u7684\u6e29\u5ea6\u8f6c\u6362\u7b97\u6cd5<\/li>\n<li>\u8f93\u51fa\uff1a\u5e26\u6444\u6c0f\u6216\u534e\u6c0f\u6807\u5fd7\u7684\u6e29\u5ea6\u503c<\/li>\n<\/ul>\n<h3>1.3.3 \u8f93\u5165\u8f93\u51fa\u683c\u5f0f\u8bbe\u8ba1<\/h3>\n<p>\u6807\u8bc6\u653e\u5728\u6e29\u5ea6\u6700\u540e\uff0cF\u8868\u793a\u534e\u6c0f\u5ea6\uff0cC\u8868\u793a\u6444\u6c0f\u5ea6<\/p>\n<p>82F\u8868\u793a\u534e\u6c0f82\u5ea6\uff0c28C\u8868\u793a\u6444\u6c0f28\u5ea6<\/p>\n<h3>1.3.4 \u8bbe\u8ba1\u7b97\u6cd5<\/h3>\n<p>\u6839\u636e\u534e\u6c0f\u548c\u6444\u6c0f\u6e29\u5ea6\u5b9a\u4e49\uff0c\u5229\u7528\u8f6c\u6362\u516c\u5f0f\u5982\u4e0b\uff1a<br \/>\n$$<br \/>\n?=(?\u201332)\/1.8<br \/>\n$$<\/p>\n<p>$$<br \/>\n?=?\u22171.8+32<br \/>\n$$<\/p>\n<p>\u5176\u4e2d\uff0c C\u8868\u793a\u6444\u6c0f\u6e29\u5ea6\uff0c F\u8868\u793a\u534e\u6c0f\u6e29\u5ea6<\/p>\n<h1>\u4e8c\u3001&quot;\u6e29\u5ea6\u8f6c\u6362&quot;\u5b9e\u4f8b\u7f16\u5199<\/h1>\n<pre><code class=\"language-python\"># TempConvert.py\n\nTempStr = input(&quot;\u8bf7\u8f93\u5165\u5e26\u6709\u7b26\u53f7\u7684\u6e29\u5ea6\u503c: &quot;)\n\nif TempStr[-1] in [&#039;F&#039;, &#039;f&#039;]:\n    C = (eval(TempStr[0:-1]) - 32) \/ 1.8\n    print(f&quot;\u8f6c\u6362\u540e\u7684\u6e29\u5ea6\u662f{C:.2f}C&quot;)\nelif TempStr[-1] in [&#039;C&#039;, &#039;c&#039;]:\n    F = 1.8 * eval(TempStr[0:-1]) + 32\n    print(f&quot;\u8f6c\u6362\u540e\u7684\u6e29\u5ea6\u662f{F:.2f}F&quot;)\nelse:\n    print(&quot;\u8f93\u5165\u683c\u5f0f\u9519\u8bef&quot;)<\/code><\/pre>\n<p>\u7f16\u5199\u4e0a\u8ff0\u4ee3\u7801\uff0c\u5e76\u4fdd\u5b58\u4e3aTempConvert.py\u6587\u4ef6<\/p>\n<pre><code class=\"language-python\"># TempConvert.py\n\nTempStr = input(&quot;\u8bf7\u8f93\u5165\u5e26\u6709\u7b26\u53f7\u7684\u6e29\u5ea6\u503c: &quot;)\n\nif TempStr[-1] in [&#039;F&#039;, &#039;f&#039;]:\n    C = (eval(TempStr[0:-1]) - 32) \/ 1.8\n    print(f&quot;\u8f6c\u6362\u540e\u7684\u6e29\u5ea6\u662f{C:.2f}C&quot;)\nelif TempStr[-1] in [&#039;C&#039;, &#039;c&#039;]:\n    F = 1.8 * eval(TempStr[0:-1]) + 32\n    print(f&quot;\u8f6c\u6362\u540e\u7684\u6e29\u5ea6\u662f{F:.2f}F&quot;)\nelse:\n    print(&quot;\u8f93\u5165\u683c\u5f0f\u9519\u8bef&quot;)<\/code><\/pre>\n<pre><code class=\"language-python\">\u8bf7\u8f93\u5165\u5e26\u6709\u7b26\u53f7\u7684\u6e29\u5ea6\u503c: 12f\n\u8f6c\u6362\u540e\u7684\u6e29\u5ea6\u662f-11.11C<\/code><\/pre>\n<h1>\u4e09\u3001&quot;\u6e29\u5ea6\u8f6c\u6362&quot;\u4e3e\u4e00\u53cd\u4e09<\/h1>\n<h2>3.1 Python\u8bed\u6cd5\u5143\u7d20\u7406\u89e3<\/h2>\n<ul>\n<li>\u6e29\u5ea6\u8f6c\u6362\u7a0b\u5e8f\u517110\u884c\u4ee3\u7801\uff0c\u4f46\u5305\u542b\u5f88\u591a\u8bed\u6cd5\u5143\u7d20<\/li>\n<li>\u6e05\u695a\u7406\u89e3\u8fd910\u884c\u4ee3\u7801\u80fd\u591f\u5feb\u901f\u5165\u95e8Python\u8bed\u8a00<\/li>\n<li>\u53c2\u8003\u6846\u67b6\u7ed3\u6784\u3001\u9010\u884c\u5206\u6790\u3001\u9010\u8bcd\u7406\u89e3<\/li>\n<\/ul>\n<h2>3.2 \u8f93\u5165\u8f93\u51fa\u7684\u6539\u53d8<\/h2>\n<ul>\n<li>\u6e29\u5ea6\u6570\u503c\u4e0e\u6e29\u5ea6\u6807\u8bc6\u4e4b\u95f4\u5173\u7cfb\u7684\u8bbe\u8ba1\u53ef\u4ee5\u6539\u53d8<\/li>\n<li>\u6807\u8bc6\u6539\u53d8\u653e\u5728\u6e29\u5ea6\u6570\u503c\u4e4b\u524d\uff1aC82, F28<\/li>\n<li>\u6807\u8bc6\u5b57\u7b26\u6539\u53d8\u4e3a\u591a\u4e2a\u5b57\u7b26\uff1a82Ce\u300128Fa<\/li>\n<\/ul>\n<h2>3.3 \u8ba1\u7b97\u95ee\u9898\u7684\u6269\u5c55<\/h2>\n<ul>\n<li>\u6e29\u5ea6\u8f6c\u6362\u95ee\u9898\u662f\u5404\u7c7b\u8f6c\u6362\u95ee\u9898\u7684\u4ee3\u8868\u6027\u95ee\u9898<\/li>\n<li>\u8d27\u5e01\u8f6c\u6362\u3001\u957f\u5ea6\u8f6c\u6362\u3001\u91cd\u91cf\u8f6c\u6362\u3001\u9762\u79ef\u8f6c\u6362\u2026<\/li>\n<li>\u95ee\u9898\u4e0d\u540c\uff0c\u4f46\u7a0b\u5e8f\u4ee3\u7801\u76f8\u4f3c<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001&quot;\u6e29\u5ea6\u8f6c\u6362&quot;\u95ee\u9898\u5206\u6790 1.1 \u6e29\u5ea6\u8f6c\u6362 \u6e29\u5ea6\u523b\u753b\u7684\u4e24\u79cd\u4e0d\u540c\u4f53\u7cfb \u6444\u6c0f\u5ea6\uff1a\u4e2d\u56fd\u7b49\u4e16\u754c\u5927\u591a [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":5508,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[371,372],"tags":[],"_links":{"self":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/5544"}],"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=5544"}],"version-history":[{"count":0,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/posts\/5544\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=\/wp\/v2\/media\/5508"}],"wp:attachment":[{"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5544"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/egonlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}