{"id":323,"date":"2026-02-03T19:27:01","date_gmt":"2026-02-03T11:27:01","guid":{"rendered":"http:\/\/lhy.cpolar.top\/?p=323"},"modified":"2026-02-03T19:27:21","modified_gmt":"2026-02-03T11:27:21","slug":"turtle%e5%ba%93-%e6%a1%88%e4%be%8b6%ef%bc%9a%e7%94%bb%e7%8e%ab%e7%91%b0%e8%8a%b1","status":"publish","type":"post","link":"http:\/\/lhy.cpolar.top\/?p=323","title":{"rendered":"turtle\u5e93\u2014\u2014\u6848\u4f8b6\uff1a\u753b\u73ab\u7470\u82b1"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>#!\/usr\/bin\/env python\n# coding: utf-8#\u7ed8\u5236\u73ab\u7470\u82b1\u5e76\u6dfb\u52a0\u6587\u5b57\nimport turtle \n# \u8bbe\u7f6e\u753b\u5e03\u5927\u5c0f\n# turtle.screensize(canvwidth=None, canvheight=None, bg=None)\nturtle.setup(width=0.6, height=0.6)\n# \u8bbe\u7f6e\u521d\u59cb\u4f4d\u7f6e\nturtle.fillcolor(\"red\")\nturtle.begin_fill()\nturtle.circle(10, 180)\nturtle.circle(25, 110)\nturtle.left(50)\nturtle.circle(60, 45)\nturtle.circle(20, 170)\nturtle.right(24)\nturtle.fd(30)\nturtle.left(10)\nturtle.circle(30, 110)\nturtle.fd(20)\nturtle.left(40)\nturtle.circle(90, 70)\nturtle.circle(30, 150)\nturtle.right(30)\nturtle.fd(15)\nturtle.circle(80, 90)\nturtle.left(15)\nturtle.fd(45)\nturtle.right(165)\nturtle.fd(20)\nturtle.left(155)\nturtle.circle(150, 80)\nturtle.left(50)\nturtle.circle(150, 90)\nturtle.end_fill()# \u82b1\u74e31\nturtle.left(150)\nturtle.circle(-90, 70)\nturtle.left(20)\nturtle.circle(75, 105)\nturtle.setheading(60)\nturtle.circle(80, 98)\nturtle.circle(-90, 40)# \u82b1\u74e32\nturtle.left(180)\nturtle.circle(90, 40)\nturtle.circle(-80, 98)\nturtle.setheading(-83)# \u53f6\u5b501\nturtle.fd(30)\nturtle.left(90)\nturtle.fd(25)\nturtle.left(45)\nturtle.fillcolor(\"green\")\nturtle.begin_fill()\nturtle.circle(-80, 90)\nturtle.right(90)\nturtle.circle(-80, 90)\nturtle.end_fill()\nturtle.right(135)\nturtle.fd(60)\nturtle.left(180)\nturtle.fd(85)\nturtle.left(90)\nturtle.fd(80)# \u53f6\u5b502\nturtle.right(90)\nturtle.right(45)\nturtle.fillcolor(\"green\")\nturtle.begin_fill()\nturtle.circle(80, 90)\nturtle.left(90)\nturtle.circle(80, 90)\nturtle.end_fill()\nturtle.left(135)\nturtle.fd(60)\nturtle.left(180)\nturtle.fd(60)\nturtle.right(90)\nturtle.circle(200, 60)\nturtle.done()\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[8,19,20],"class_list":["post-323","post","type-post","status-publish","format-standard","hentry","category-tyjs","tag-python","tag-turtle","tag-20"],"_links":{"self":[{"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/posts\/323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=323"}],"version-history":[{"count":1,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/posts\/323\/revisions"}],"predecessor-version":[{"id":324,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/posts\/323\/revisions\/324"}],"wp:attachment":[{"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=323"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}