{"id":329,"date":"2026-02-03T19:29:45","date_gmt":"2026-02-03T11:29:45","guid":{"rendered":"http:\/\/lhy.cpolar.top\/?p=329"},"modified":"2026-02-03T19:29:45","modified_gmt":"2026-02-03T11:29:45","slug":"turtle%e5%ba%93-%e6%a1%88%e4%be%8b8%ef%bc%9a%e7%94%bb%e5%9c%a3%e8%af%9e%e6%a0%91","status":"publish","type":"post","link":"http:\/\/lhy.cpolar.top\/?p=329","title":{"rendered":"turtle\u5e93\u2014\u2014\u6848\u4f8b8\uff1a\u753b\u5723\u8bde\u6811"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\">import turtle<br>screen = turtle.Screen()<br>screen.setup(800, 600)<br>circle = turtle.Turtle()<br>circle.shape('circle')<br>circle.color('red')<br>circle.speed('fastest')<br>circle.up()<br>square = turtle.Turtle()<br>square.shape('square')<br>square.color('green')<br>square.speed('fastest')<br>square.up()<br>circle.goto(0, 280)<br>circle.stamp()<br>k = 0<br>for i in range(1, 17):<br>    y = 30 * i<br>    for j in range(i - k):<br>        x = 30 * j<br>        square.goto(x, -y + 280)<br>        square.stamp()<br>        square.goto(-x, -y + 280)<br>        square.stamp()<br>    if i % 4 == 0:<br>        x = 30 * (j + 1)<br>        circle.color('red')<br>        circle.goto(-x, -y + 280)<br>        circle.stamp()<br>        circle.goto(x, -y + 280)<br>        circle.stamp()<br>        k += 2<br>    if i % 4 == 3:<br>        x = 30 * (j + 1)<br>        circle.color('yellow')<br>        circle.goto(-x, -y + 280)<br>        circle.stamp()<br>        circle.goto(x, -y + 280)<br>        circle.stamp()<br>square.color('brown')<br>for i in range(17, 20):<br>    y = 30 * i<br>    for j in range(3):<br>        x = 30 * j<br>        square.goto(x, -y + 280)<br>        square.stamp()<br>        square.goto(-x, -y + 280)<br>        square.stamp()<br>turtle.exitonclick()<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>import turtlescreen = turtle.Screen()screen.setup(800,  [&hellip;]<\/p>\n","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-329","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\/329","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=329"}],"version-history":[{"count":1,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/posts\/329\/revisions"}],"predecessor-version":[{"id":330,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/posts\/329\/revisions\/330"}],"wp:attachment":[{"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=329"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}