{"id":336,"date":"2026-02-03T19:35:45","date_gmt":"2026-02-03T11:35:45","guid":{"rendered":"http:\/\/lhy.cpolar.top\/?p=336"},"modified":"2026-02-03T19:35:45","modified_gmt":"2026-02-03T11:35:45","slug":"turtle%e5%ba%93-%e6%a1%88%e4%be%8b10%ef%bc%9a%e7%94%bb%e5%93%86%e5%95%a6a%e6%a2%a6","status":"publish","type":"post","link":"http:\/\/lhy.cpolar.top\/?p=336","title":{"rendered":"turtle\u5e93\u2014\u2014\u6848\u4f8b10\uff1a\u753b\u54c6\u5566A\u68a6"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/lhy.cpolar.top\/wp-content\/uploads\/2026\/02\/%E7%94%BB%E5%93%86%E5%95%A6A%E6%A2%A6.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"http:\/\/lhy.cpolar.top\/wp-content\/uploads\/2026\/02\/%E7%94%BB%E5%93%86%E5%95%A6A%E6%A2%A6.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\u5f53\u524d\u56fe\u7247\u6ca1\u6709\u66ff\u4ee3\u6587\u5b57\u3002\u6587\u4ef6\u540d\u4e3a\uff1a%e7%94%bb%e5%93%86%e5%95%a6a%e6%a2%a6\" \/><\/div><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>from turtle import *\n# \u65e0\u8f68\u8ff9\u8df3\u8dc3\ndef my_goto(x, y):\n    penup()\n    goto(x, y)\n    pendown()\n# \u773c\u775b\ndef eyes():\n    fillcolor(\"#ffffff\")\n    begin_fill()\n    tracer(False)\n    a = 2.5\n    for i in range(120):\n        if 0 &lt;= i &lt; 30 or 60 &lt;= i &lt; 90:\n            a -= 0.05\n            lt(3)\n            fd(a)\n        else:\n            a += 0.05\n            lt(3)\n            fd(a)\n    tracer(True)\n    end_fill()\n# \u80e1\u987b\ndef beard():\n    my_goto(-32, 135)\n    seth(165)\n    fd(60)\n    my_goto(-32, 125)\n    seth(180)\n    fd(60)\n    my_goto(-32, 115)\n    seth(193)\n    fd(60)\n    my_goto(37, 135)\n    seth(15)\n    fd(60)\n    my_goto(37, 125)\n    seth(0)\n    fd(60)\n    my_goto(37, 115)\n    seth(-13)\n    fd(60)\n# \u5634\u5df4\ndef mouth():\n    my_goto(5, 148)\n    seth(270)\n    fd(100)\n    seth(0)\n    circle(120, 50)\n    seth(230)\n    circle(-120, 100)\n# \u56f4\u5dfe\ndef scarf():\n    fillcolor('#e70010')\n    begin_fill()\n    seth(0)\n    fd(200)\n    circle(-5, 90)\n    fd(10)\n    circle(-5, 90)\n    fd(207)\n    circle(-5, 90)\n    fd(10)\n    circle(-5, 90)\n    end_fill()\n# \u9f3b\u5b50\ndef nose():\n    my_goto(-10, 158)\n    seth(315)\n    fillcolor('#e70010')\n    begin_fill()\n    circle(20)\n    end_fill()\n# \u9ed1\u773c\u775b\ndef black_eyes():\n    seth(0)\n    my_goto(-20, 195)\n    fillcolor('#000000')\n    begin_fill()\n    circle(13)\n    end_fill()\n    pensize(6)\n    my_goto(20, 205)\n    seth(75)\n    circle(-10, 150)\n    pensize(3)\n    my_goto(-17, 200)\n    seth(0)\n    fillcolor('#ffffff')\n    begin_fill()\n    circle(5)\n    end_fill()\n    my_goto(0, 0)\n# \u8138\ndef face():\n    fd(183)\n    lt(45)\n    fillcolor('#ffffff')\n    begin_fill()\n    circle(120, 100)\n    seth(180)\n    # print(pos())\n    fd(121)\n    pendown()\n    seth(215)\n    circle(120, 100)\n    end_fill()\n    my_goto(63.56, 218.24)\n    seth(90)\n    eyes()\n    seth(180)\n    penup()\n    fd(60)\n    pendown()\n    seth(90)\n    eyes()\n    penup()\n    seth(180)\n    fd(64)\n# \u5934\u578b\ndef head():\n    penup()\n    circle(150, 40)\n    pendown()\n    fillcolor('#00a0de')\n    begin_fill()\n    circle(150, 280)\n    end_fill()\n# \u753b\u54c6\u5566A\u68a6\ndef Doraemon():\n    # \u5934\u90e8\n    head()\n    # \u56f4\u8116\n    scarf()\n    # \u8138\n    face()\n    # \u7ea2\u9f3b\u5b50\n    nose()\n    # \u5634\u5df4\n    mouth()\n    # \u80e1\u987b\n    beard()\n    # \u8eab\u4f53\n    my_goto(0, 0)\n    seth(0)\n    penup()\n    circle(150, 50)\n    pendown()\n    seth(30)\n    fd(40)\n    seth(70)\n    circle(-30, 270)\n    fillcolor('#00a0de')\n    begin_fill()\n    seth(230)\n    fd(80)\n    seth(90)\n    circle(1000, 1)\n    seth(-89)\n    circle(-1000, 10)\n    # print(pos())\n    seth(180)\n    fd(70)\n    seth(90)\n    circle(30, 180)\n    seth(180)\n    fd(70)\n    # print(pos())\n    seth(100)\n    circle(-1000, 9)\n    seth(-86)\n    circle(1000, 2)\n    seth(230)\n    fd(40)\n    # print(pos())\n    circle(-30, 230)\n    seth(45)\n    fd(81)\n    seth(0)\n    fd(203)\n    circle(5, 90)\n    fd(10)\n    circle(5, 90)\n    fd(7)\n    seth(40)\n    circle(150, 10)\n    seth(30)\n    fd(40)\n    end_fill()\n    # \u5de6\u624b\n    seth(70)\n    fillcolor('#ffffff')\n    begin_fill()\n    circle(-30)\n    end_fill()\n    # \u811a\n    my_goto(103.74, -182.59)\n    seth(0)\n    fillcolor('#ffffff')\n    begin_fill()\n    fd(15)\n    circle(-15, 180)\n    fd(90)\n    circle(-15, 180)\n    fd(10)\n    end_fill()\n    my_goto(-96.26, -182.59)\n    seth(180)\n    fillcolor('#ffffff')\n    begin_fill()\n    fd(15)\n    circle(15, 180)\n    fd(90)\n    circle(15, 180)\n    fd(10)\n    end_fill()\n    # \u53f3\u624b\n    my_goto(-133.97, -91.81)\n    seth(50)\n    fillcolor('#ffffff')\n    begin_fill()\n    circle(30)\n    end_fill()\n    # \u53e3\u888b\n    my_goto(-103.42, 15.09)\n    seth(0)\n    fd(38)\n    seth(230)\n    begin_fill()\n    circle(90, 260)\n    end_fill()\n    my_goto(5, -40)\n    seth(0)\n    fd(70)\n    seth(-90)\n    circle(-70, 180)\n    seth(0)\n    fd(70)\n    # \u94c3\u94db\n    my_goto(-103.42, 15.09)\n    fd(90)\n    seth(70)\n    fillcolor('#ffd200')\n    # print(pos())\n    begin_fill()\n    circle(-20)\n    end_fill()\n    seth(170)\n    fillcolor('#ffd200')\n    begin_fill()\n    circle(-2, 180)\n    seth(10)\n    circle(-100, 22)\n    circle(-2, 180)\n    seth(180 - 10)\n    circle(100, 22)\n    end_fill()\n    goto(-13.42, 15.09)\n    seth(250)\n    circle(20, 110)\n    seth(90)\n    fd(15)\n    dot(10)\n    my_goto(0, -150)\n    # \u753b\u773c\u775b\n    black_eyes()\nif __name__ == '__main__':\n    screensize(800, 600, \"#f0f0f0\")\n    pensize(3)  # \u753b\u7b14\u5bbd\u5ea6\n    speed(9)  # \u753b\u7b14\u901f\u5ea6\n    Doraemon()\n    my_goto(100, -300)\n    write('CSDN\u5317\u5c71\u5566', font=(\"Bradley Hand ITC\", 30, \"bold\"))\n    mainloop()\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":7,"featured_media":337,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[8,19,20],"class_list":["post-336","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tyjs","tag-python","tag-turtle","tag-20"],"_links":{"self":[{"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/posts\/336","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=336"}],"version-history":[{"count":1,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/posts\/336\/revisions"}],"predecessor-version":[{"id":338,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/posts\/336\/revisions\/338"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=\/wp\/v2\/media\/337"}],"wp:attachment":[{"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=336"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/lhy.cpolar.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}