{"id":20745,"date":"2024-11-19T17:29:48","date_gmt":"2024-11-19T09:29:48","guid":{"rendered":"https:\/\/fwq.ai\/blog\/20745\/"},"modified":"2024-11-19T17:29:48","modified_gmt":"2024-11-19T09:29:48","slug":"sublime%e5%a6%82%e4%bd%95%e8%b0%83%e7%94%a8input%e5%87%bd%e6%95%b0","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/20745\/","title":{"rendered":"sublime\u5982\u4f55\u8c03\u7528input\u51fd\u6570"},"content":{"rendered":"<blockquote><p>\n  \u5728 sublime text \u4e2d\u8c03\u7528 input() \u51fd\u6570\uff1a\u5b89\u88c5 python \u63d2\u4ef6\u3002\u5728 python \u6587\u4ef6\u4e2d\u4f7f\u7528\u8bed\u6cd5 &#8220;user_input = input(&#8220;\u63d0\u793a\u4fe1\u606f\uff1a&#8221;)&#8221; \u8c03\u7528 input() \u51fd\u6570\uff0c\u5176\u4e2d &#8220;\u63d0\u793a\u4fe1\u606f&#8221; \u4e3a\u63d0\u793a\u7528\u6237\u8f93\u5165\u503c\u7684\u5b57\u7b26\u4e32\u3002\u6309 enter \u952e\u8f93\u5165\u503c\uff0c\u8be5\u503c\u5c06\u5b58\u50a8\u5728 user_input \u53d8\u91cf\u4e2d\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/03\/2024040317152256019.jpg\" class=\"aligncenter\" title=\"sublime\u5982\u4f55\u8c03\u7528input\u51fd\u6570\u63d2\u56fe\" alt=\"sublime\u5982\u4f55\u8c03\u7528input\u51fd\u6570\u63d2\u56fe\" \/><\/p>\n<p><strong>Sublime Text \u4e2d\u8c03\u7528 input() \u51fd\u6570<\/strong><\/p>\n<p><strong>\u5f15\u8a00<\/strong><\/p>\n<p>Sublime Text \u662f\u4e00\u4e2a\u6d41\u884c\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u5b83\u5141\u8bb8\u7528\u6237\u7f16\u5199\u548c\u7f16\u8f91\u4ee3\u7801\u3002input() \u51fd\u6570\u5728 Python \u4e2d\u7528\u4e8e\u83b7\u53d6\u7528\u6237\u7684\u8f93\u5165\u3002\u672c\u6587\u5c06\u6307\u5bfc\u60a8\u5982\u4f55\u5728 Sublime Text \u4e2d\u8c03\u7528 input() \u51fd\u6570\u3002<\/p>\n<p><strong>\u6b65\u9aa4<\/strong><\/p>\n<ol>\n<li>\u786e\u4fdd\u60a8\u5df2\u5b89\u88c5 Python \u63d2\u4ef6\u3002<\/li>\n<li>\u6253\u5f00\u6216\u521b\u5efa\u8981\u4f7f\u7528 input() \u51fd\u6570\u7684 Python \u6587\u4ef6\u3002<\/li>\n<li>\u5728\u6587\u4ef6\u4e2d\uff0c\u4f7f\u7528\u4ee5\u4e0b\u8bed\u6cd5\u8c03\u7528 input() \u51fd\u6570\uff1a<\/li>\n<\/ol>\n<pre>user_input = input(\"\u63d0\u793a\u4fe1\u606f\uff1a\")<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ol>\n<li>&#8220;\u63d0\u793a\u4fe1\u606f&#8221; \u5c06\u663e\u793a\u5728\u63d0\u793a\u7b26\u4e2d\uff0c\u63d0\u793a\u7528\u6237\u8f93\u5165\u503c\u3002<\/li>\n<li>\u6309 Enter \u952e\u8f93\u5165\u503c\u3002<\/li>\n<li>\u8f93\u5165\u7684\u503c\u5c06\u5b58\u50a8\u5728 user_input \u53d8\u91cf\u4e2d\u3002<\/li>\n<\/ol>\n<p><strong>\u793a\u4f8b<\/strong><\/p>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\uff0c\u6f14\u793a\u5982\u4f55\u4f7f\u7528 input() \u51fd\u6570\u5728 Sublime Text \u4e2d\u83b7\u53d6\u7528\u6237\u7684\u59d3\u540d\uff1a<\/p>\n<pre># \u83b7\u53d6\u7528\u6237\u7684\u59d3\u540d\nname = input(\"\u8bf7\u8f93\u5165\u60a8\u7684\u59d3\u540d\uff1a\")\n\n# \u6253\u5370\u7528\u6237\u7684\u59d3\u540d\nprint(\"\u60a8\u7684\u59d3\u540d\u662f\uff1a\", name)<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u63d0\u793a<\/strong><\/p>\n<ul>\n<li>\u786e\u4fdd\u5728\u8c03\u7528 input() \u51fd\u6570\u4e4b\u524d\u6b63\u786e\u5bfc\u5165 Python \u5e93\u3002<\/li>\n<li>\u53ef\u4ee5\u5728\u63d0\u793a\u4fe1\u606f\u4e2d\u4f7f\u7528 &#8221; &#8221; \u6362\u884c\u7b26\u6765\u7ec4\u7ec7\u63d0\u793a\u3002<\/li>\n<li>\u8981\u83b7\u53d6\u6574\u6570\u503c\uff0c\u53ef\u4ee5\u4f7f\u7528 int(input()) \u51fd\u6570\u5c06\u7528\u6237\u8f93\u5165\u8f6c\u6362\u4e3a\u6574\u6570\u3002<\/li>\n<li>\u8981\u83b7\u53d6\u6d6e\u70b9\u6570\u503c\uff0c\u53ef\u4ee5\u4f7f\u7528 float(input()) \u51fd\u6570\u5c06\u7528\u6237\u8f93\u5165\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u8c03\u7528input\u51fd\u6570\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 sublime text \u4e2d\u8c03\u7528 input() \u51fd\u6570\uff1a\u5b89\u88c5 python \u63d2\u4ef6\u3002\u5728 python \u6587\u4ef6\u4e2d\u4f7f\u7528\u8bed\u6cd5 &#8220;user_input = input(&#8220;\u63d0\u793a\u4fe1\u606f\uff1a&#8221;)&#8221; \u8c03\u7528 input() \u51fd\u6570\uff0c\u5176\u4e2d &#8220;\u63d0\u793a\u4fe1\u606f&#8221; \u4e3a\u63d0\u793a\u7528\u6237\u8f93\u5165\u503c\u7684\u5b57\u7b26\u4e32\u3002\u6309 enter \u952e\u8f93\u5165\u503c\uff0c\u8be5\u503c\u5c06\u5b58\u50a8\u5728 user_input \u53d8\u91cf\u4e2d\u3002 Sublime Text \u4e2d\u8c03\u7528 input() \u51fd\u6570 \u5f15\u8a00 Sublime Text \u662f\u4e00\u4e2a\u6d41\u884c\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u5b83\u5141\u8bb8\u7528\u6237\u7f16\u5199\u548c\u7f16\u8f91\u4ee3\u7801\u3002input() \u51fd\u6570\u5728 Python \u4e2d\u7528\u4e8e\u83b7\u53d6\u7528\u6237\u7684\u8f93\u5165\u3002\u672c\u6587\u5c06\u6307\u5bfc\u60a8\u5982\u4f55\u5728 Sublime Text \u4e2d\u8c03\u7528 input() \u51fd\u6570\u3002 \u6b65\u9aa4 \u786e\u4fdd\u60a8\u5df2\u5b89\u88c5 Python \u63d2\u4ef6\u3002 \u6253\u5f00\u6216\u521b\u5efa\u8981\u4f7f\u7528 input() \u51fd\u6570\u7684 Python \u6587\u4ef6\u3002 \u5728\u6587\u4ef6\u4e2d\uff0c\u4f7f\u7528\u4ee5\u4e0b\u8bed\u6cd5\u8c03\u7528 input() \u51fd\u6570\uff1a user_input = input(&#8220;\u63d0\u793a\u4fe1\u606f\uff1a&#8221;) \u767b\u5f55\u540e\u590d\u5236 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-20745","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=20745"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20745\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=20745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=20745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=20745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}