{"id":936166,"date":"2024-12-26T19:12:13","date_gmt":"2024-12-26T11:12:13","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/936166.html"},"modified":"2024-12-26T19:12:15","modified_gmt":"2024-12-26T11:12:15","slug":"python%e5%a6%82%e4%bd%95%e5%bc%95%e5%85%a5tutle","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/936166.html","title":{"rendered":"python\u5982\u4f55\u5f15\u5165tutle"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25072306\/9e5bd39f-a8bc-48d8-adf2-48617eaf1350.webp\" alt=\"python\u5982\u4f55\u5f15\u5165tutle\" \/><\/p>\n<p><p> Python\u4e2d\u5f15\u5165<code>turtle<\/code>\u6a21\u5757\u7684\u65b9\u6cd5\u76f8\u5bf9\u7b80\u5355\uff0c\u4e3b\u8981\u6b65\u9aa4\u5305\u62ec\u5b89\u88c5Python\u3001\u542f\u52a8Python\u89e3\u91ca\u5668\u3001\u4f7f\u7528<code>import turtle<\/code>\u8bed\u53e5\u6765\u5f15\u5165<code>turtle<\/code>\u6a21\u5757\u3002<strong>\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u5b89\u88c5\u4e86Python\u3001\u6253\u5f00Python\u89e3\u91ca\u5668\u3001\u901a\u8fc7import turtle\u5f15\u5165\u6a21\u5757<\/strong>\u3002\u6211\u4eec\u5c06\u8be6\u7ec6\u8ba8\u8bba\u5982\u4f55\u8bbe\u7f6e\u73af\u5883\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528<code>turtle<\/code>\u6a21\u5757\u7ed8\u5236\u56fe\u5f62\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b89\u88c5Python<\/p>\n<\/p>\n<p><p>\u8981\u4f7f\u7528<code>turtle<\/code>\u6a21\u5757\uff0c\u9996\u5148\u9700\u8981\u5728\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5Python\u3002Python\u662f\u4e00\u79cd\u5f3a\u5927\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u63d0\u4f9b\u4e86\u5e7f\u6cdb\u7684\u5e93\u548c\u6a21\u5757\u4f9b\u5f00\u53d1\u8005\u4f7f\u7528\u3002\u4ee5\u4e0b\u662f\u5b89\u88c5Python\u7684\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e0b\u8f7dPython\u5b89\u88c5\u5305<\/strong>\uff1a\u8bbf\u95eePython\u5b98\u7f51\uff08<a href=\"https:\/\/www.python.org\/%EF%BC%89%EF%BC%8C%E4%B8%8B%E8%BD%BD%E9%80%82%E5%90%88%E4%BD%A0%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84Python%E7%89%88%E6%9C%AC%E3%80%82%E5%BB%BA%E8%AE%AE%E4%B8%8B%E8%BD%BD%E6%9C%80%E6%96%B0%E7%9A%84%E7%A8%B3%E5%AE%9A%E7%89%88%E6%9C%AC%E3%80%82\">https:\/\/www.python.org\/\uff09\uff0c\u4e0b\u8f7d\u9002\u5408\u4f60\u64cd\u4f5c\u7cfb\u7edf\u7684Python\u7248\u672c\u3002\u5efa\u8bae\u4e0b\u8f7d\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\u3002<\/a><\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5Python<\/strong>\uff1a\u6309\u7167\u4e0b\u8f7d\u9875\u9762\u4e0a\u7684\u8bf4\u660e\u5b89\u88c5Python\u3002\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u786e\u4fdd\u9009\u62e9\u5c06Python\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684PATH\u4e2d\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u4f7f\u7528Python\u547d\u4ee4\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9a8c\u8bc1\u5b89\u88c5<\/strong>\uff1a\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\uff0c\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\uff0c\u67e5\u770b\u662f\u5426\u6b63\u786e\u5b89\u88c5\u4e86Python\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u542f\u52a8Python\u89e3\u91ca\u5668<\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u542f\u52a8Python\u89e3\u91ca\u5668\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef<\/strong>\uff1a\u5728Windows\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u201c\u5f00\u59cb\u201d\u83dc\u5355\u641c\u7d22\u201ccmd\u201d\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u3002\u5728Mac\u6216Linux\u4e2d\uff0c\u6253\u5f00\u201c\u7ec8\u7aef\u201d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u542f\u52a8Python\u89e3\u91ca\u5668<\/strong>\uff1a\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\u4e2d\u8f93\u5165<code>python<\/code>\u6216<code>python3<\/code>\uff0c\u7136\u540e\u6309\u56de\u8f66\u952e\u5373\u53ef\u8fdb\u5165Python\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u5f15\u5165<code>turtle<\/code>\u6a21\u5757<\/p>\n<\/p>\n<p><p>\u5728Python\u89e3\u91ca\u5668\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u5f15\u5165<code>turtle<\/code>\u6a21\u5757\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5f15\u5165\u6a21\u5757<\/strong>\uff1a\u5728Python\u89e3\u91ca\u5668\u4e2d\u8f93\u5165<code>import turtle<\/code>\uff0c\u7136\u540e\u6309\u56de\u8f66\u952e\u3002\u8fd9\u5c06\u5f15\u5165<code>turtle<\/code>\u6a21\u5757\uff0c\u5e76\u4f7f\u5176\u529f\u80fd\u53ef\u4f9b\u4f7f\u7528\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7ed8\u5236\u7b80\u5355\u56fe\u5f62<\/strong>\uff1a\u5f15\u5165<code>turtle<\/code>\u6a21\u5757\u540e\uff0c\u53ef\u4ee5\u5f00\u59cb\u4f7f\u7528\u5176\u529f\u80fd\u7ed8\u5236\u56fe\u5f62\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528<code>turtle.forward(100)<\/code>\u6307\u4ee4\u8ba9\u6d77\u9f9f\u5411\u524d\u79fb\u52a8100\u4e2a\u5355\u4f4d\uff0c\u6216\u8005\u4f7f\u7528<code>turtle.right(90)<\/code>\u6307\u4ee4\u8ba9\u6d77\u9f9f\u53f3\u8f6c90\u5ea6\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u4f7f\u7528<code>turtle<\/code>\u6a21\u5757\u7ed8\u5236\u56fe\u5f62<\/p>\n<\/p>\n<p><p><code>turtle<\/code>\u6a21\u5757\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u5355\u6613\u7528\u7684\u65b9\u5f0f\u6765\u7ed8\u5236\u56fe\u5f62\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u57fa\u672c\u7684\u7ed8\u56fe\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8bbe\u7f6e\u7a97\u53e3<\/strong>\uff1a\u53ef\u4ee5\u901a\u8fc7<code>turtle.setup(width, height)<\/code>\u8bbe\u7f6e\u7ed8\u56fe\u7a97\u53e3\u7684\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u79fb\u52a8\u6d77\u9f9f<\/strong>\uff1a\u4f7f\u7528<code>turtle.forward(distance)<\/code>\u548c<code>turtle.backward(distance)<\/code>\u63a7\u5236\u6d77\u9f9f\u524d\u8fdb\u548c\u540e\u9000\uff0c\u4f7f\u7528<code>turtle.left(angle)<\/code>\u548c<code>turtle.right(angle)<\/code>\u63a7\u5236\u6d77\u9f9f\u5de6\u8f6c\u548c\u53f3\u8f6c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7ed8\u5236\u5f62\u72b6<\/strong>\uff1a\u53ef\u4ee5\u901a\u8fc7\u4e00\u7cfb\u5217\u79fb\u52a8\u548c\u8f6c\u5411\u6307\u4ee4\u7ed8\u5236\u5404\u79cd\u5f62\u72b6\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u7ed3\u5408\u4f7f\u7528\u524d\u8fdb\u3001\u8f6c\u5411\u6307\u4ee4\u7ed8\u5236\u6b63\u65b9\u5f62\u3001\u4e09\u89d2\u5f62\u7b49\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8bbe\u7f6e\u989c\u8272<\/strong>\uff1a\u4f7f\u7528<code>turtle.color(color)<\/code>\u8bbe\u7f6e\u7ed8\u5236\u7ebf\u6761\u7684\u989c\u8272\uff0c\u4f7f\u7528<code>turtle.fillcolor(color)<\/code>\u8bbe\u7f6e\u586b\u5145\u989c\u8272\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u586b\u5145\u5f62\u72b6<\/strong>\uff1a\u5728\u7ed8\u5236\u5c01\u95ed\u5f62\u72b6\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>turtle.begin_fill()<\/code>\u548c<code>turtle.end_fill()<\/code>\u6765\u586b\u5145\u5f62\u72b6\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9690\u85cf\u6d77\u9f9f<\/strong>\uff1a\u5b8c\u6210\u7ed8\u56fe\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528<code>turtle.hideturtle()<\/code>\u9690\u85cf\u6d77\u9f9f\u5f62\u72b6\uff0c\u53ea\u663e\u793a\u7ed8\u5236\u7684\u56fe\u5f62\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4fdd\u6301\u7a97\u53e3\u6253\u5f00<\/strong>\uff1a\u7ed8\u56fe\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7<code>turtle.done()<\/code>\u4fdd\u6301\u7a97\u53e3\u6253\u5f00\uff0c\u4ee5\u4fbf\u67e5\u770b\u7ed8\u5236\u7ed3\u679c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001<code>turtle<\/code>\u6a21\u5757\u7684\u9ad8\u7ea7\u529f\u80fd<\/p>\n<\/p>\n<p><p><code>turtle<\/code>\u6a21\u5757\u4e0d\u4ec5\u652f\u6301\u57fa\u672c\u7684\u56fe\u5f62\u7ed8\u5236\uff0c\u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e9b\u9ad8\u7ea7\u529f\u80fd\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u52a8\u753b\u6548\u679c<\/strong>\uff1a\u53ef\u4ee5\u901a\u8fc7<code>turtle.speed(speed)<\/code>\u8c03\u6574\u7ed8\u5236\u901f\u5ea6\uff0c\u4ee5\u5b9e\u73b0\u52a8\u753b\u6548\u679c\u3002\u901f\u5ea6\u8303\u56f4\u4ece0\u523010\uff0c0\u8868\u793a\u6700\u5feb\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4e8b\u4ef6\u5904\u7406<\/strong>\uff1a\u652f\u6301\u901a\u8fc7<code>turtle.onclick()<\/code>, <code>turtle.ondrag()<\/code>, <code>turtle.onrelease()<\/code>\u7b49\u65b9\u6cd5\u5904\u7406\u9f20\u6807\u4e8b\u4ef6\uff0c\u53ef\u4ee5\u5b9e\u73b0\u4ea4\u4e92\u5f0f\u7ed8\u56fe\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5750\u6807\u7cfb<\/strong>\uff1a\u53ef\u4ee5\u4f7f\u7528<code>turtle.setpos(x, y)<\/code>\u76f4\u63a5\u8bbe\u7f6e\u6d77\u9f9f\u7684\u4f4d\u7f6e\uff0c\u4f7f\u7528<code>turtle.setheading(angle)<\/code>\u8bbe\u7f6e\u6d77\u9f9f\u7684\u65b9\u5411\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5faa\u73af\u7ed8\u56fe<\/strong>\uff1a\u901a\u8fc7\u5faa\u73af\u7ed3\u6784\uff08\u5982for\u5faa\u73af\uff09\u7ed3\u5408<code>turtle<\/code>\u6307\u4ee4\uff0c\u53ef\u4ee5\u7b80\u5316\u590d\u6742\u56fe\u5f62\u7684\u7ed8\u5236\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u81ea\u5b9a\u4e49\u5f62\u72b6<\/strong>\uff1a\u53ef\u4ee5\u4f7f\u7528<code>turtle.register_shape(name, shape)<\/code>\u6ce8\u518c\u81ea\u5b9a\u4e49\u5f62\u72b6\uff0c\u4ee5\u4fbf\u5728\u7ed8\u56fe\u65f6\u4f7f\u7528\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516d\u3001\u5b9e\u4f8b\uff1a\u7ed8\u5236\u591a\u8fb9\u5f62<\/p>\n<\/p>\n<p><p>\u4e0b\u9762\u662f\u4e00\u4e2a\u4f7f\u7528<code>turtle<\/code>\u6a21\u5757\u7ed8\u5236\u591a\u8fb9\u5f62\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import turtle<\/p>\n<p>def draw_polygon(sides, length):<\/p>\n<p>    angle = 360 \/ sides<\/p>\n<p>    for _ in range(sides):<\/p>\n<p>        turtle.forward(length)<\/p>\n<p>        turtle.right(angle)<\/p>\n<h2><strong>\u8bbe\u7f6e\u7a97\u53e3\u548c\u6d77\u9f9f\u901f\u5ea6<\/strong><\/h2>\n<p>turtle.setup(600, 600)<\/p>\n<p>turtle.speed(5)<\/p>\n<h2><strong>\u7ed8\u5236\u4e94\u8fb9\u5f62<\/strong><\/h2>\n<p>draw_polygon(5, 100)<\/p>\n<h2><strong>\u4fdd\u6301\u7a97\u53e3\u6253\u5f00<\/strong><\/h2>\n<p>turtle.done()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u793a\u4f8b\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528<code>turtle<\/code>\u6a21\u5757\u7ed8\u5236\u4e00\u4e2a\u4e94\u8fb9\u5f62\u3002\u6211\u4eec\u5b9a\u4e49\u4e86\u4e00\u4e2a\u51fd\u6570<code>draw_polygon<\/code>\uff0c\u8be5\u51fd\u6570\u63a5\u53d7\u8fb9\u6570\u548c\u8fb9\u957f\u4f5c\u4e3a\u53c2\u6570\uff0c\u5e76\u5229\u7528\u5faa\u73af\u548c<code>turtle<\/code>\u6307\u4ee4\u7ed8\u5236\u591a\u8fb9\u5f62\u3002<\/p>\n<\/p>\n<p><p>\u4e03\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u901a\u8fc7<code>import turtle<\/code>\u5f15\u5165<code>turtle<\/code>\u6a21\u5757\uff0c\u53ef\u4ee5\u5728Python\u4e2d\u8f7b\u677e\u5b9e\u73b0\u56fe\u5f62\u7ed8\u5236\u3002<strong>\u5b89\u88c5Python\u3001\u542f\u52a8\u89e3\u91ca\u5668\u3001\u5229\u7528<code>turtle<\/code>\u7ed8\u5236\u56fe\u5f62<\/strong>\uff0c\u662f\u4f7f\u7528<code>turtle<\/code>\u6a21\u5757\u7684\u57fa\u672c\u6b65\u9aa4\u3002\u6b64\u5916\uff0c<code>turtle<\/code>\u6a21\u5757\u652f\u6301\u4e30\u5bcc\u7684\u7ed8\u56fe\u529f\u80fd\uff0c\u5305\u62ec\u8bbe\u7f6e\u989c\u8272\u3001\u5904\u7406\u4e8b\u4ef6\u3001\u81ea\u5b9a\u4e49\u5f62\u72b6\u7b49\uff0c\u4e3a\u5f00\u53d1\u8005\u63d0\u4f9b\u4e86\u6781\u5927\u7684\u7075\u6d3b\u6027\u548c\u4fbf\u5229\u6027\u3002\u5e0c\u671b\u672c\u6587\u80fd\u591f\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u4e86\u89e3\u5e76\u4f7f\u7528<code>turtle<\/code>\u6a21\u5757\u8fdb\u884c\u56fe\u5f62\u7ed8\u5236\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5b89\u88c5turtle\u6a21\u5757\uff1f<\/strong><br \/>turtle\u6a21\u5757\u662fPython\u5185\u7f6e\u7684\u6807\u51c6\u5e93\u4e4b\u4e00\uff0c\u56e0\u6b64\u65e0\u9700\u8fdb\u884c\u989d\u5916\u7684\u5b89\u88c5\u3002\u53ea\u9700\u786e\u4fdd\u60a8\u5df2\u7ecf\u5b89\u88c5\u4e86Python\uff0c\u901a\u5e38turtle\u6a21\u5757\u4f1a\u4e0ePython\u4e00\u8d77\u81ea\u52a8\u5b89\u88c5\u3002\u60a8\u53ef\u4ee5\u76f4\u63a5\u5728Python\u73af\u5883\u4e2d\u4f7f\u7528<code>import turtle<\/code>\u547d\u4ee4\u6765\u5f15\u5165\u8be5\u6a21\u5757\u3002<\/p>\n<p><strong>turtle\u6a21\u5757\u7684\u4e3b\u8981\u529f\u80fd\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>turtle\u6a21\u5757\u4e3b\u8981\u7528\u4e8e\u56fe\u5f62\u7ed8\u5236\u548c\u7b80\u5355\u52a8\u753b\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u79cd\u76f4\u89c2\u7684\u65b9\u5f0f\u6765\u7ed8\u5236\u56fe\u5f62\uff0c\u901a\u8fc7\u63a7\u5236\u201c\u6d77\u9f9f\u201d\u7684\u79fb\u52a8\u548c\u65cb\u8f6c\uff0c\u7528\u6237\u53ef\u4ee5\u521b\u5efa\u5404\u79cd\u5f62\u72b6\u3001\u56fe\u6848\u548c\u52a8\u753b\u6548\u679c\u3002\u8fd9\u4f7f\u5f97turtle\u6a21\u5757\u975e\u5e38\u9002\u5408\u521d\u5b66\u8005\u5b66\u4e60\u7f16\u7a0b\u548c\u56fe\u5f62\u8bbe\u8ba1\u3002<\/p>\n<p><strong>\u5982\u4f55\u4f7f\u7528turtle\u6a21\u5757\u7ed8\u5236\u7b80\u5355\u7684\u56fe\u5f62\uff1f<\/strong><br \/>\u4f7f\u7528turtle\u6a21\u5757\u7ed8\u5236\u56fe\u5f62\u975e\u5e38\u7b80\u5355\u3002\u9996\u5148\uff0c\u5bfc\u5165turtle\u6a21\u5757\uff0c\u7136\u540e\u521b\u5efa\u4e00\u4e2a\u6d77\u9f9f\u5bf9\u8c61\u3002\u63a5\u7740\uff0c\u901a\u8fc7\u8c03\u7528\u6d77\u9f9f\u5bf9\u8c61\u7684\u65b9\u6cd5\uff0c\u4f8b\u5982<code>forward()<\/code>\u3001<code>right()<\/code>\u3001<code>left()<\/code>\u7b49\uff0c\u53ef\u4ee5\u63a7\u5236\u6d77\u9f9f\u7684\u79fb\u52a8\u548c\u65b9\u5411\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u7ed8\u5236\u4e00\u4e2a\u6b63\u65b9\u5f62\uff1a<\/p>\n<pre><code class=\"language-python\">import turtle\n\nt = turtle.Turtle()\nfor _ in range(4):\n    t.forward(100)  # \u5411\u524d\u79fb\u52a8100\u5355\u4f4d\n    t.right(90)     # \u53f3\u8f6c90\u5ea6\nturtle.done()      # \u7ed3\u675f\u7ed8\u5236\n<\/code><\/pre>\n<p>\u8fd0\u884c\u8be5\u4ee3\u7801\u540e\uff0c\u60a8\u5c06\u770b\u5230\u4e00\u4e2a\u7b80\u5355\u7684\u6b63\u65b9\u5f62\u56fe\u5f62\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4e2d\u5f15\u5165turtle\u6a21\u5757\u7684\u65b9\u6cd5\u76f8\u5bf9\u7b80\u5355\uff0c\u4e3b\u8981\u6b65\u9aa4\u5305\u62ec\u5b89\u88c5Python\u3001\u542f\u52a8Python\u89e3\u91ca\u5668\u3001\u4f7f\u7528i [&hellip;]","protected":false},"author":3,"featured_media":936168,"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\/936166"}],"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=936166"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/936166\/revisions"}],"predecessor-version":[{"id":936169,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/936166\/revisions\/936169"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/936168"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=936166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=936166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=936166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}