{"id":1025020,"date":"2024-12-30T14:18:54","date_gmt":"2024-12-30T06:18:54","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1025020.html"},"modified":"2024-12-30T14:18:57","modified_gmt":"2024-12-30T06:18:57","slug":"python%e5%a6%82%e4%bd%95%e9%9a%90%e8%97%8f%e5%b0%8f%e4%b9%8c%e9%be%9f-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1025020.html","title":{"rendered":"python\u5982\u4f55\u9690\u85cf\u5c0f\u4e4c\u9f9f"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/a8168891-e172-471b-b8f2-0bff35054837.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u5982\u4f55\u9690\u85cf\u5c0f\u4e4c\u9f9f\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u9690\u85cf\u5c0f\u4e4c\u9f9f\u7684\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528<code>turtle.hideturtle()<\/code>\u3001\u4f7f\u7528<code>turtle.speed(0)<\/code>\u3001\u4f7f\u7528<code>turtle.tracer(0, 0)<\/code>\u3002<\/strong> \u5176\u4e2d\uff0c<code>turtle.hideturtle()<\/code>\u662f\u6700\u5e38\u7528\u7684\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u76f4\u63a5\u9690\u85cf\u5c0f\u4e4c\u9f9f\u7684\u56fe\u5f62\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u63cf\u8ff0<code>turtle.hideturtle()<\/code>\u7684\u4f7f\u7528\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p><code>turtle.hideturtle()<\/code> \u662f Python \u7684 <code>turtle<\/code> \u6a21\u5757\u4e2d\u7684\u4e00\u4e2a\u65b9\u6cd5\uff0c\u7528\u4e8e\u9690\u85cf\u7ed8\u56fe\u8fc7\u7a0b\u4e2d\u663e\u793a\u7684\u5c0f\u4e4c\u9f9f\u56fe\u50cf\u3002\u5c0f\u4e4c\u9f9f\u56fe\u50cf\u662f\u7528\u6765\u6307\u793a\u5f53\u524d\u7ed8\u56fe\u7684\u65b9\u5411\u548c\u4f4d\u7f6e\u7684\uff0c\u9690\u85cf\u5b83\u53ef\u4ee5\u8ba9\u7ed8\u56fe\u8fc7\u7a0b\u66f4\u52a0\u7b80\u6d01\u548c\u7f8e\u89c2\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u5177\u4f53\u7684\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import turtle<\/p>\n<h2><strong>\u521b\u5efa\u5c4f\u5e55\u548c\u5c0f\u4e4c\u9f9f\u5bf9\u8c61<\/strong><\/h2>\n<p>screen = turtle.Screen()<\/p>\n<p>t = turtle.Turtle()<\/p>\n<h2><strong>\u7ed8\u5236\u4e00\u4e2a\u6b63\u65b9\u5f62<\/strong><\/h2>\n<p>for _ in range(4):<\/p>\n<p>    t.forward(100)<\/p>\n<p>    t.right(90)<\/p>\n<h2><strong>\u9690\u85cf\u5c0f\u4e4c\u9f9f<\/strong><\/h2>\n<p>t.hideturtle()<\/p>\n<h2><strong>\u663e\u793a\u7ed8\u5236\u7ed3\u679c<\/strong><\/h2>\n<p>screen.m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>nloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u5148\u521b\u5efa\u4e86\u4e00\u4e2a\u5c4f\u5e55\u548c\u4e00\u4e2a\u5c0f\u4e4c\u9f9f\u5bf9\u8c61\uff0c\u7136\u540e\u4f7f\u7528\u4e00\u4e2a\u5faa\u73af\u7ed8\u5236\u4e86\u4e00\u4e2a\u6b63\u65b9\u5f62\uff0c\u6700\u540e\u901a\u8fc7\u8c03\u7528 <code>t.hideturtle()<\/code> \u9690\u85cf\u4e86\u5c0f\u4e4c\u9f9f\u56fe\u50cf\u3002\u8fd9\u6837\uff0c\u6700\u7ec8\u663e\u793a\u7684\u7ed3\u679c\u4e2d\u5c31\u53ea\u6709\u7ed8\u5236\u7684\u6b63\u65b9\u5f62\uff0c\u800c\u6ca1\u6709\u5c0f\u4e4c\u9f9f\u7684\u56fe\u50cf\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528<code>turtle.hideturtle()<\/code><\/h3>\n<\/p>\n<p><p><code>turtle.hideturtle()<\/code> \u662f <code>turtle<\/code> \u6a21\u5757\u4e2d\u7684\u4e00\u4e2a\u65b9\u6cd5\uff0c\u7528\u4e8e\u9690\u85cf\u7ed8\u56fe\u8fc7\u7a0b\u4e2d\u663e\u793a\u7684\u5c0f\u4e4c\u9f9f\u56fe\u50cf\u3002\u8fd9\u4e2a\u65b9\u6cd5\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5728\u7ed8\u56fe\u5b8c\u6210\u540e\u8c03\u7528\u4e00\u6b21\u5373\u53ef\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u8be6\u7ec6\u7684\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import turtle<\/p>\n<p>def draw_square(t, size):<\/p>\n<p>    for _ in range(4):<\/p>\n<p>        t.forward(size)<\/p>\n<p>        t.right(90)<\/p>\n<h2><strong>\u521b\u5efa\u5c4f\u5e55\u548c\u5c0f\u4e4c\u9f9f\u5bf9\u8c61<\/strong><\/h2>\n<p>screen = turtle.Screen()<\/p>\n<p>t = turtle.Turtle()<\/p>\n<h2><strong>\u7ed8\u5236\u4e00\u4e2a\u6b63\u65b9\u5f62<\/strong><\/h2>\n<p>draw_square(t, 100)<\/p>\n<h2><strong>\u9690\u85cf\u5c0f\u4e4c\u9f9f<\/strong><\/h2>\n<p>t.hideturtle()<\/p>\n<h2><strong>\u663e\u793a\u7ed8\u5236\u7ed3\u679c<\/strong><\/h2>\n<p>screen.mainloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u51fd\u6570 <code>draw_square<\/code>\uff0c\u7528\u4e8e\u7ed8\u5236\u4e00\u4e2a\u6b63\u65b9\u5f62\u3002\u7136\u540e\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a\u5c4f\u5e55\u548c\u4e00\u4e2a\u5c0f\u4e4c\u9f9f\u5bf9\u8c61\uff0c\u901a\u8fc7\u8c03\u7528 <code>draw_square<\/code> \u6765\u7ed8\u5236\u6b63\u65b9\u5f62\uff0c\u6700\u540e\u4f7f\u7528 <code>t.hideturtle()<\/code> \u9690\u85cf\u5c0f\u4e4c\u9f9f\u3002\u8fd9\u6837\uff0c\u6700\u7ec8\u663e\u793a\u7684\u7ed3\u679c\u4e2d\u5c31\u53ea\u6709\u7ed8\u5236\u7684\u6b63\u65b9\u5f62\uff0c\u800c\u6ca1\u6709\u5c0f\u4e4c\u9f9f\u7684\u56fe\u50cf\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528<code>turtle.speed(0)<\/code><\/h3>\n<\/p>\n<p><p><code>turtle.speed(0)<\/code> \u662f\u53e6\u4e00\u4e2a\u53ef\u4ee5\u7528\u6765\u9690\u85cf\u5c0f\u4e4c\u9f9f\u7684\u65b9\u6cd5\u3002\u8fd9\u4e2a\u65b9\u6cd5\u5b9e\u9645\u4e0a\u662f\u8bbe\u7f6e\u5c0f\u4e4c\u9f9f\u7684\u7ed8\u56fe\u901f\u5ea6\u4e3a\u6700\u5feb\uff0c\u5373\u4e0d\u663e\u793a\u5c0f\u4e4c\u9f9f\u7684\u79fb\u52a8\u8fc7\u7a0b\u3002\u867d\u7136\u5c0f\u4e4c\u9f9f\u56fe\u50cf\u6ca1\u6709\u88ab\u5b8c\u5168\u9690\u85cf\uff0c\u4f46\u7531\u4e8e\u7ed8\u56fe\u901f\u5ea6\u975e\u5e38\u5feb\uff0c\u56e0\u6b64\u5728\u5b9e\u9645\u6548\u679c\u4e0a\u770b\u8d77\u6765\u5c31\u50cf\u662f\u9690\u85cf\u4e86\u5c0f\u4e4c\u9f9f\u4e00\u6837\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import turtle<\/p>\n<p>def draw_circle(t, radius):<\/p>\n<p>    t.circle(radius)<\/p>\n<h2><strong>\u521b\u5efa\u5c4f\u5e55\u548c\u5c0f\u4e4c\u9f9f\u5bf9\u8c61<\/strong><\/h2>\n<p>screen = turtle.Screen()<\/p>\n<p>t = turtle.Turtle()<\/p>\n<h2><strong>\u8bbe\u7f6e\u7ed8\u56fe\u901f\u5ea6\u4e3a\u6700\u5feb<\/strong><\/h2>\n<p>t.speed(0)<\/p>\n<h2><strong>\u7ed8\u5236\u4e00\u4e2a\u5706<\/strong><\/h2>\n<p>draw_circle(t, 50)<\/p>\n<h2><strong>\u663e\u793a\u7ed8\u5236\u7ed3\u679c<\/strong><\/h2>\n<p>screen.mainloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u51fd\u6570 <code>draw_circle<\/code>\uff0c\u7528\u4e8e\u7ed8\u5236\u4e00\u4e2a\u5706\u3002\u7136\u540e\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a\u5c4f\u5e55\u548c\u4e00\u4e2a\u5c0f\u4e4c\u9f9f\u5bf9\u8c61\uff0c\u901a\u8fc7\u8c03\u7528 <code>draw_circle<\/code> \u6765\u7ed8\u5236\u5706\u3002\u5728\u7ed8\u56fe\u4e4b\u524d\uff0c\u6211\u4eec\u4f7f\u7528 <code>t.speed(0)<\/code> \u8bbe\u7f6e\u5c0f\u4e4c\u9f9f\u7684\u7ed8\u56fe\u901f\u5ea6\u4e3a\u6700\u5feb\u3002\u8fd9\u6837\uff0c\u867d\u7136\u5c0f\u4e4c\u9f9f\u56fe\u50cf\u6ca1\u6709\u88ab\u5b8c\u5168\u9690\u85cf\uff0c\u4f46\u7531\u4e8e\u7ed8\u56fe\u901f\u5ea6\u975e\u5e38\u5feb\uff0c\u56e0\u6b64\u5728\u5b9e\u9645\u6548\u679c\u4e0a\u770b\u8d77\u6765\u5c31\u50cf\u662f\u9690\u85cf\u4e86\u5c0f\u4e4c\u9f9f\u4e00\u6837\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4f7f\u7528<code>turtle.tracer(0, 0)<\/code><\/h3>\n<\/p>\n<p><p><code>turtle.tracer(0, 0)<\/code> \u662f\u53e6\u4e00\u4e2a\u53ef\u4ee5\u7528\u6765\u9690\u85cf\u5c0f\u4e4c\u9f9f\u7684\u65b9\u6cd5\u3002\u8fd9\u4e2a\u65b9\u6cd5\u5b9e\u9645\u4e0a\u662f\u5173\u95ed\u5c4f\u5e55\u5237\u65b0\uff0c\u4ece\u800c\u4e0d\u663e\u793a\u5c0f\u4e4c\u9f9f\u7684\u79fb\u52a8\u8fc7\u7a0b\u3002\u867d\u7136\u5c0f\u4e4c\u9f9f\u56fe\u50cf\u6ca1\u6709\u88ab\u5b8c\u5168\u9690\u85cf\uff0c\u4f46\u7531\u4e8e\u5c4f\u5e55\u6ca1\u6709\u5237\u65b0\uff0c\u56e0\u6b64\u5728\u5b9e\u9645\u6548\u679c\u4e0a\u770b\u8d77\u6765\u5c31\u50cf\u662f\u9690\u85cf\u4e86\u5c0f\u4e4c\u9f9f\u4e00\u6837\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u4f8b\u5b50\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import turtle<\/p>\n<p>def draw_triangle(t, size):<\/p>\n<p>    for _ in range(3):<\/p>\n<p>        t.forward(size)<\/p>\n<p>        t.left(120)<\/p>\n<h2><strong>\u521b\u5efa\u5c4f\u5e55\u548c\u5c0f\u4e4c\u9f9f\u5bf9\u8c61<\/strong><\/h2>\n<p>screen = turtle.Screen()<\/p>\n<p>t = turtle.Turtle()<\/p>\n<h2><strong>\u5173\u95ed\u5c4f\u5e55\u5237\u65b0<\/strong><\/h2>\n<p>turtle.tracer(0, 0)<\/p>\n<h2><strong>\u7ed8\u5236\u4e00\u4e2a\u4e09\u89d2\u5f62<\/strong><\/h2>\n<p>draw_triangle(t, 100)<\/p>\n<h2><strong>\u66f4\u65b0\u5c4f\u5e55\u663e\u793a<\/strong><\/h2>\n<p>turtle.update()<\/p>\n<h2><strong>\u663e\u793a\u7ed8\u5236\u7ed3\u679c<\/strong><\/h2>\n<p>screen.mainloop()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u51fd\u6570 <code>draw_triangle<\/code>\uff0c\u7528\u4e8e\u7ed8\u5236\u4e00\u4e2a\u4e09\u89d2\u5f62\u3002\u7136\u540e\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a\u5c4f\u5e55\u548c\u4e00\u4e2a\u5c0f\u4e4c\u9f9f\u5bf9\u8c61\uff0c\u901a\u8fc7\u8c03\u7528 <code>draw_triangle<\/code> \u6765\u7ed8\u5236\u4e09\u89d2\u5f62\u3002\u5728\u7ed8\u56fe\u4e4b\u524d\uff0c\u6211\u4eec\u4f7f\u7528 <code>turtle.tracer(0, 0)<\/code> \u5173\u95ed\u5c4f\u5e55\u5237\u65b0\u3002\u8fd9\u6837\uff0c\u867d\u7136\u5c0f\u4e4c\u9f9f\u56fe\u50cf\u6ca1\u6709\u88ab\u5b8c\u5168\u9690\u85cf\uff0c\u4f46\u7531\u4e8e\u5c4f\u5e55\u6ca1\u6709\u5237\u65b0\uff0c\u56e0\u6b64\u5728\u5b9e\u9645\u6548\u679c\u4e0a\u770b\u8d77\u6765\u5c31\u50cf\u662f\u9690\u85cf\u4e86\u5c0f\u4e4c\u9f9f\u4e00\u6837\u3002\u7ed8\u56fe\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u4f7f\u7528 <code>turtle.update()<\/code> \u66f4\u65b0\u5c4f\u5e55\u663e\u793a\uff0c\u4ee5\u4fbf\u663e\u793a\u7ed8\u5236\u7684\u7ed3\u679c\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u4ecb\u7ecd\u4e86\u51e0\u79cd\u5728Python\u4e2d\u9690\u85cf\u5c0f\u4e4c\u9f9f\u7684\u65b9\u6cd5\uff0c\u5305\u62ec\u4f7f\u7528 <code>turtle.hideturtle()<\/code>\u3001<code>turtle.speed(0)<\/code> \u548c <code>turtle.tracer(0, 0)<\/code>\u3002\u5176\u4e2d\uff0c<code>turtle.hideturtle()<\/code> \u662f\u6700\u5e38\u7528\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u76f4\u63a5\u9690\u85cf\u5c0f\u4e4c\u9f9f\u7684\u56fe\u50cf\uff1b<code>turtle.speed(0)<\/code> \u548c <code>turtle.tracer(0, 0)<\/code> \u5219\u901a\u8fc7\u8bbe\u7f6e\u7ed8\u56fe\u901f\u5ea6\u6216\u5173\u95ed\u5c4f\u5e55\u5237\u65b0\u6765\u5b9e\u73b0\u7c7b\u4f3c\u7684\u6548\u679c\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><p>\u6b64\u5916\uff0c\u8fd8\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c<code>turtle<\/code> \u6a21\u5757\u662fPython\u4e2d\u4e00\u4e2a\u975e\u5e38\u5f3a\u5927\u7684\u7ed8\u56fe\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765\u7ed8\u5236\u5404\u79cd\u56fe\u5f62\u548c\u52a8\u753b\u3002\u5b66\u4e60\u548c\u638c\u63e1 <code>turtle<\/code> \u6a21\u5757\u7684\u4f7f\u7528\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u5730\u8fdb\u884c\u56fe\u5f62\u7f16\u7a0b\u548c\u52a8\u753b\u8bbe\u8ba1\u3002\u5e0c\u671b\u672c\u6587\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff0c\u795d\u4f60\u5728Python\u7f16\u7a0b\u7684\u9053\u8def\u4e0a\u53d6\u5f97\u66f4\u5927\u7684\u8fdb\u6b65\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>1. \u5982\u4f55\u5728Python\u4e2d\u4f7f\u7528\u5c0f\u4e4c\u9f9f\u6a21\u5757\u8fdb\u884c\u56fe\u5f62\u7ed8\u5236\uff1f<\/strong><br \/>\u5c0f\u4e4c\u9f9f\uff08turtle\uff09\u6a21\u5757\u662fPython\u4e2d\u4e00\u4e2a\u975e\u5e38\u6709\u8da3\u7684\u56fe\u5f62\u7ed8\u5236\u5de5\u5177\u3002\u901a\u8fc7\u8fd9\u4e2a\u6a21\u5757\uff0c\u4f60\u53ef\u4ee5\u7528\u7b80\u5355\u7684\u547d\u4ee4\u63a7\u5236\u4e4c\u9f9f\u5728\u5c4f\u5e55\u4e0a\u79fb\u52a8\u5e76\u7ed8\u5236\u5404\u79cd\u56fe\u5f62\u3002\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u5df2\u7ecf\u5b89\u88c5\u4e86Python\uff0c\u5e76\u5bfc\u5165turtle\u6a21\u5757\u3002\u4f7f\u7528<code>turtle.forward()<\/code>\u548c<code>turtle.right()<\/code>\u7b49\u51fd\u6570\u53ef\u4ee5\u63a7\u5236\u4e4c\u9f9f\u7684\u8fd0\u52a8\uff0c\u521b\u5efa\u51fa\u7f8e\u4e3d\u7684\u56fe\u6848\u3002<\/p>\n<p><strong>2. \u4f7f\u7528Python\u7684\u5c0f\u4e4c\u9f9f\u65f6\uff0c\u5982\u4f55\u8c03\u6574\u4e4c\u9f9f\u7684\u53ef\u89c1\u6027\uff1f<\/strong><br \/>\u5728\u4f7f\u7528\u5c0f\u4e4c\u9f9f\u7ed8\u5236\u56fe\u5f62\u65f6\uff0c\u53ef\u80fd\u9700\u8981\u6839\u636e\u9700\u8981\u9690\u85cf\u4e4c\u9f9f\u7684\u5f62\u8c61\u4ee5\u4fbf\u4e13\u6ce8\u4e8e\u56fe\u5f62\u672c\u8eab\u3002\u53ef\u4ee5\u4f7f\u7528<code>turtle.hideturtle()<\/code>\u51fd\u6570\u6765\u9690\u85cf\u4e4c\u9f9f\u7684\u56fe\u5f62\uff0c\u800c\u4f7f\u7528<code>turtle.showturtle()<\/code>\u53ef\u4ee5\u91cd\u65b0\u663e\u793a\u4e4c\u9f9f\u3002\u8fd9\u6837\u53ef\u4ee5\u8ba9\u4f60\u7684\u56fe\u5f62\u66f4\u52a0\u6e05\u6670\uff0c\u7279\u522b\u662f\u5728\u7ed8\u5236\u590d\u6742\u7684\u56fe\u6848\u65f6\u3002<\/p>\n<p><strong>3. \u5c0f\u4e4c\u9f9f\u7ed8\u56fe\u65f6\u5982\u4f55\u5b9e\u73b0\u52a8\u6001\u6548\u679c\uff1f<\/strong><br \/>\u4e3a\u4e86\u8ba9\u5c0f\u4e4c\u9f9f\u7ed8\u5236\u7684\u56fe\u5f62\u66f4\u5177\u52a8\u611f\uff0c\u53ef\u4ee5\u7ed3\u5408\u4f7f\u7528\u65f6\u95f4\u5ef6\u8fdf\u548c\u4e4c\u9f9f\u7684\u8fd0\u52a8\u3002\u901a\u8fc7<code>turtle.speed()<\/code>\u51fd\u6570\u8bbe\u7f6e\u4e4c\u9f9f\u7684\u901f\u5ea6\uff0c\u5e76\u4f7f\u7528<code>turtle.ontimer()<\/code>\u6765\u521b\u5efa\u5b9a\u65f6\u5668\uff0c\u4f7f\u5f97\u4e4c\u9f9f\u80fd\u591f\u6309\u7167\u9884\u8bbe\u7684\u65f6\u95f4\u95f4\u9694\u4e0d\u65ad\u79fb\u52a8\uff0c\u4ece\u800c\u4ea7\u751f\u52a8\u753b\u6548\u679c\u3002\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4ec5\u589e\u52a0\u4e86\u7ed8\u56fe\u7684\u8da3\u5473\u6027\uff0c\u4e5f\u80fd\u63d0\u9ad8\u4f60\u7684\u7f16\u7a0b\u6280\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u9690\u85cf\u5c0f\u4e4c\u9f9f\u7684\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528turtle.hideturtle()\u3001\u4f7f\u7528turtle.speed( [&hellip;]","protected":false},"author":3,"featured_media":1025026,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1025020"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1025020"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1025020\/revisions"}],"predecessor-version":[{"id":1025028,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1025020\/revisions\/1025028"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1025026"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1025020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1025020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1025020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}