{"id":47779,"date":"2025-07-30T09:17:39","date_gmt":"2025-07-30T01:17:39","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/47779.html"},"modified":"2025-07-30T09:17:39","modified_gmt":"2025-07-30T01:17:39","slug":"%e6%96%b0%e6%89%8b%e5%90%91%e5%88%9b%e6%84%8fpython%e7%88%b1%e5%bf%83%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/47779.html","title":{"rendered":"\u65b0\u624b\u5411:\u521b\u610fPython\u7231\u5fc3\u4ee3\u7801"},"content":{"rendered":"<h2>\u521b\u610fPython\u7231\u5fc3\u4ee3\u7801\u89e3\u6790&#xff1a;\u7528\u4ee3\u7801\u7ed8\u5236\u6d6a\u6f2b<\/h2>\n<p>\u7f16\u7a0b\u4e0d\u4ec5\u662f\u89e3\u51b3\u95ee\u9898\u7684\u5de5\u5177&#xff0c;\u4e5f\u80fd\u6210\u4e3a\u8868\u8fbe\u521b\u610f\u7684\u827a\u672f\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u89e3\u6790\u5982\u4f55\u7528Python\u7684turtle\u6a21\u5757\u7ed8\u5236\u4e00\u4e2a\u52a8\u6001\u8df3\u52a8\u7684\u7231\u5fc3&#xff0c;\u8fd9\u4e2a\u6559\u7a0b\u7279\u522b\u9002\u5408\u96f6\u57fa\u7840\u7528\u6237\u5b66\u4e60\u3002<\/p>\n<p>\u9996\u5148\u9700\u8981\u786e\u4fdd\u4f60\u7684Python\u73af\u5883\u5df2\u7ecf\u5b89\u88c5\u4e86turtle\u6a21\u5757&#xff08;\u901a\u5e38Python\u6807\u51c6\u5e93\u81ea\u5e26&#xff09;\u3002\u5b8c\u6574\u4ee3\u7801\u5982\u4e0b&#xff1a;<\/p>\n<p>import turtle<br \/>\nimport math<\/p>\n<p># \u8bbe\u7f6e\u753b\u5e03\u548c\u753b\u7b14<br \/>\nscreen &#061; turtle.Screen()<br \/>\nscreen.bgcolor(&#034;black&#034;)<br \/>\npen &#061; turtle.Turtle()<br \/>\npen.speed(0)  # \u6700\u5feb\u901f\u5ea6<br \/>\npen.color(&#034;red&#034;, &#034;pink&#034;)  # \u8fb9\u6846\u7ea2\u8272&#xff0c;\u586b\u5145\u7c89\u8272<\/p>\n<p># \u7ed8\u5236\u7231\u5fc3\u51fd\u6570<br \/>\ndef draw_heart(t, size):<br \/>\n    t.begin_fill()<br \/>\n    for i in range(200):<br \/>\n        rad &#061; math.radians(i)<br \/>\n        x &#061; 16 * (math.sin(rad) ** 3)<br \/>\n        y &#061; 13 * math.cos(rad) &#8211; 5 * math.cos(2*rad) &#8211; 2 * math.cos(3*rad) &#8211; math.cos(4*rad)<br \/>\n        t.goto(x * size, y * size)<br \/>\n    t.end_fill()<\/p>\n<p># \u52a8\u753b\u6548\u679c&#xff1a;\u8ba9\u7231\u5fc3\u8df3\u52a8<br \/>\ndef animate():<br \/>\n    for size in [10, 12, 10, 8, 10, 12, 10]:<br \/>\n        pen.clear()<br \/>\n        draw_heart(pen, size)<br \/>\n        turtle.update()<br \/>\n        turtle.delay(100)<\/p>\n<p># \u4e3b\u7a0b\u5e8f<br \/>\nturtle.tracer(0, 0)  # \u5173\u95ed\u52a8\u753b\u7ed8\u5236\u8fc7\u7a0b<br \/>\nanimate()<br \/>\nturtle.mainloop()<\/p>\n<h3>\u4ee3\u7801\u89e3\u6790<\/h3>\n<h4>1. \u51c6\u5907\u5de5\u4f5c<\/h4>\n<ul>\n<li>turtle.Screen() \u521b\u5efa\u7ed8\u56fe\u7a97\u53e3<\/li>\n<li>bgcolor(&#034;black&#034;) \u8bbe\u7f6e\u9ed1\u8272\u80cc\u666f<\/li>\n<li>pen &#061; turtle.Turtle() \u521b\u5efa\u753b\u7b14\u5bf9\u8c61<\/li>\n<li>speed(0) \u8bbe\u7f6e\u6700\u5feb\u7ed8\u5236\u901f\u5ea6<\/li>\n<\/ul>\n<h4>2. \u7231\u5fc3\u6570\u5b66\u516c\u5f0f<\/h4>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u4f7f\u7528\u4e86\u53c2\u6570\u65b9\u7a0b\u6765\u7ed8\u5236\u7231\u5fc3\u5f62\u72b6&#xff1a;<\/p>\n<ul>\n<li>x &#061; 16sin\u00b3(t)<\/li>\n<li>y &#061; 13cos(t) &#8211; 5cos(2t) &#8211; 2cos(3t) &#8211; cos(4t)<\/li>\n<\/ul>\n<p>\u5176\u4e2dt\u4ece0\u52302\u03c0\u5f27\u5ea6&#xff08;\u53730-360\u5ea6&#xff09;\u53d8\u5316&#xff0c;\u901a\u8fc7\u4e0d\u65ad\u8ba1\u7b97x,y\u5750\u6807\u70b9\u6765\u7ed8\u5236\u51fa\u7231\u5fc3\u8f6e\u5ed3\u3002<\/p>\n<h4>3. \u52a8\u753b\u6548\u679c\u5b9e\u73b0<\/h4>\n<p>animate()\u51fd\u6570\u901a\u8fc7\u6539\u53d8size\u53c2\u6570\u8ba9\u7231\u5fc3\u5148\u653e\u5927\u518d\u7f29\u5c0f&#xff0c;\u6a21\u62df\u5fc3\u8df3\u6548\u679c&#xff1a;<\/p>\n<ul>\n<li>\u4f7f\u7528\u4e0d\u540csize\u503c(10,12,10,8&#8230;)\u4ea4\u66ff\u53d8\u5316<\/li>\n<li>\u6bcf\u6b21\u53d8\u5316\u524d\u6e05\u9664\u753b\u5e03(pen.clear())<\/li>\n<li>turtle.update()\u5237\u65b0\u663e\u793a<\/li>\n<li>turtle.delay(100)\u63a7\u5236\u52a8\u753b\u901f\u5ea6<\/li>\n<\/ul>\n<h4>4. \u4f18\u5316\u6280\u5de7<\/h4>\n<ul>\n<li>turtle.tracer(0,0)\u5173\u95ed\u4e2d\u95f4\u7ed8\u5236\u8fc7\u7a0b&#xff0c;\u76f4\u63a5\u663e\u793a\u6700\u7ec8\u56fe\u5f62<\/li>\n<li>begin_fill()\u548cend_fill()\u5b9e\u73b0\u7231\u5fc3\u586b\u5145\u6548\u679c<\/li>\n<\/ul>\n<h3>\u6269\u5c55\u521b\u610f<\/h3>\n<p>\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u4fee\u6539\u8fd9\u4e9b\u53c2\u6570\u6765\u521b\u9020\u4e0d\u540c\u6548\u679c&#xff1a;<\/p>\n<li>\u6539\u53d8\u586b\u5145\u989c\u8272&#xff1a;\u4fee\u6539pen.color()\u53c2\u6570<\/li>\n<li>\u6dfb\u52a0\u6587\u5b57&#xff1a;\u4f7f\u7528pen.write()\u5728\u7231\u5fc3\u4e0a\u5199\u5b57<\/li>\n<li>\u591a\u4e2a\u7231\u5fc3&#xff1a;\u590d\u5236\u7ed8\u5236\u4ee3\u7801\u5e76\u8c03\u6574\u4f4d\u7f6e<\/li>\n<li>\u968f\u673a\u989c\u8272&#xff1a;\u4f7f\u7528random\u6a21\u5757\u8ba9\u989c\u8272\u53d8\u5316<\/li>\n<p>\u8fd9\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\u5c55\u793a\u4e86\u5982\u4f55\u7528\u6570\u5b66\u516c\u5f0f\u548c\u7f16\u7a0b\u521b\u9020\u51fa\u7f8e\u4e3d\u7684\u56fe\u5f62&#xff0c;\u5e0c\u671b\u5b83\u80fd\u6fc0\u53d1\u4f60\u5bf9\u7f16\u7a0b\u827a\u672f\u7684\u5174\u8da3&#xff01;<\/p>\n<hr \/>\n<h4>\u4ee3\u7801\u529f\u80fd\u6982\u8ff0<\/h4>\n<p>\u8fd9\u6bb5\u4ee3\u7801\u901a\u8fc7\u6570\u5b66\u516c\u5f0f\u548c\u56fe\u5f62\u5e93\u7ed3\u5408&#xff0c;\u751f\u6210\u4e00\u4e2a\u9010\u6e10\u81a8\u80c0\u7684\u7ea2\u8272\u7231\u5fc3\u52a8\u753b&#xff0c;\u5e76\u4f34\u968f\u6587\u5b57\u6807\u7b7e\u3002\u6838\u5fc3\u903b\u8f91\u5206\u4e3a\u4e09\u90e8\u5206&#xff1a;<\/p>\n<li>\u4f7f\u7528\u6570\u5b66\u51fd\u6570\u5b9a\u4e49\u7231\u5fc3\u5f62\u72b6<\/li>\n<li>\u901a\u8fc7\u5faa\u73af\u5b9e\u73b0\u52a8\u753b\u6548\u679c<\/li>\n<li>\u6dfb\u52a0\u6587\u5b57\u4ea4\u4e92\u5143\u7d20<\/li>\n<hr \/>\n<p>\u6838\u5fc3\u6a21\u5757\u8bf4\u660e<\/p>\n<p>turtle\u662fPython\u5185\u7f6e\u7684\u7ed8\u56fe\u5e93&#xff0c;\u57fa\u4e8etkinter\u5b9e\u73b0&#xff0c;\u6a21\u62df\u753b\u5bb6\u5728\u753b\u5e03\u4e0a\u4f7f\u7528\u753b\u7b14\u4f5c\u753b\u7684\u884c\u4e3a\u3002\u8fd9\u4e2a\u6a21\u5757\u7279\u522b\u9002\u5408\u521d\u5b66\u8005\u5b66\u4e60\u7f16\u7a0b\u6982\u5ff5&#xff0c;\u4e5f\u5e38\u7528\u4e8e\u53ef\u89c6\u5316\u6559\u5b66\u548c\u7b80\u5355\u56fe\u5f62\u7ed8\u5236\u3002\u4ee5\u4e0b\u662f\u51e0\u4e2a\u5173\u952e\u65b9\u6cd5\u7684\u8be6\u7ec6\u8bf4\u660e&#xff1a;<\/p>\n<li>\n<p>turtle.penup()&#xff1a;\u62ac\u8d77\u753b\u7b14&#xff08;\u79fb\u52a8\u65f6\u4e0d\u753b\u7ebf&#xff09;<\/p>\n<ul>\n<li>\u6267\u884c\u6b64\u547d\u4ee4\u540e&#xff0c;\u6d77\u9f9f\u79fb\u52a8\u4e0d\u4f1a\u7559\u4e0b\u75d5\u8ff9<\/li>\n<li>\u5e38\u7528\u4e8e\u5c06\u753b\u7b14\u79fb\u52a8\u5230\u65b0\u7684\u8d77\u59cb\u4f4d\u7f6e\u800c\u4e0d\u7ed8\u5236\u591a\u4f59\u7684\u7ebf\u6761<\/li>\n<li>\u522b\u540d&#xff1a;turtle.up() \u6216 turtle.pu()<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>turtle.pendown()&#xff1a;\u843d\u4e0b\u753b\u7b14<\/p>\n<ul>\n<li>\u4e0epenup\u76f8\u53cd&#xff0c;\u4f7f\u6d77\u9f9f\u79fb\u52a8\u65f6\u7ed8\u5236\u7ebf\u6761<\/li>\n<li>\u901a\u5e38\u914d\u5408penup\u4f7f\u7528&#xff0c;\u5728\u79fb\u52a8\u5230\u65b0\u4f4d\u7f6e\u540e\u91cd\u65b0\u5f00\u59cb\u7ed8\u5236<\/li>\n<li>\u522b\u540d&#xff1a;turtle.pd() \u6216 turtle.down()<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>turtle.color()&#xff1a;\u8bbe\u7f6e\u7ebf\u6761\u989c\u8272<\/p>\n<ul>\n<li>\u53ef\u4ee5\u4f20\u5165\u989c\u8272\u540d\u79f0\u5b57\u7b26\u4e32&#xff0c;\u5982&#034;red&#034;\u3001&#034;blue&#034;<\/li>\n<li>\u4e5f\u53ef\u4ee5\u4f7f\u7528RGB\u5143\u7ec4&#xff0c;\u5982(255,0,0)\u8868\u793a\u7ea2\u8272<\/li>\n<li>\u793a\u4f8b&#xff1a;\n<p>turtle.color(&#034;green&#034;)  # \u8bbe\u7f6e\u753b\u7b14\u4e3a\u7eff\u8272<br \/>\nturtle.color(&#034;#FF00FF&#034;)  # \u4f7f\u7528\u5341\u516d\u8fdb\u5236\u989c\u8272\u7801<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>turtle.write()&#xff1a;\u5728\u753b\u5e03\u4e0a\u6dfb\u52a0\u6587\u5b57<\/p>\n<ul>\n<li>\u57fa\u672c\u8bed\u6cd5&#xff1a;write(arg, move&#061;False, align&#061;&#034;left&#034;, font&#061;(&#034;Arial&#034;,8,&#034;normal&#034;))<\/li>\n<li>\u53c2\u6570\u8bf4\u660e&#xff1a;\n<ul>\n<li>arg&#xff1a;\u8981\u663e\u793a\u7684\u6587\u672c\u5185\u5bb9<\/li>\n<li>move&#xff1a;\u662f\u5426\u79fb\u52a8\u753b\u7b14\u4f4d\u7f6e<\/li>\n<li>align&#xff1a;\u5bf9\u9f50\u65b9\u5f0f&#xff08;left\/center\/right&#xff09;<\/li>\n<li>font&#xff1a;\u5b57\u4f53\u6837\u5f0f&#xff08;\u5b57\u4f53\u540d,\u5927\u5c0f,\u7c7b\u578b&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\u793a\u4f8b&#xff1a;\n<p>turtle.write(&#034;Hello World!&#034;, align&#061;&#034;center&#034;, font&#061;(&#034;Times New Roman&#034;, 24, &#034;bold&#034;))<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<p>\u8fd9\u4e9b\u65b9\u6cd5\u901a\u5e38\u4e0e\u5176\u4ed6\u7ed8\u56fe\u547d\u4ee4\u914d\u5408\u4f7f\u7528&#xff0c;\u5982forward()\u3001backward()\u7b49\u79fb\u52a8\u547d\u4ee4&#xff0c;\u53ef\u4ee5\u7ed8\u5236\u51fa\u590d\u6742\u7684\u56fe\u5f62\u548c\u6587\u5b57\u7ec4\u5408\u3002<\/p>\n<hr \/>\n<h4>\u6570\u5b66\u539f\u7406<\/h4>\n<p>\u7231\u5fc3\u7684\u8f6e\u5ed3\u7531\u53c2\u6570\u65b9\u7a0b\u751f\u6210&#xff1a;<\/p>\n<ul>\n<li>x &#061; 16 * sin\u00b3\u03b8<\/li>\n<li>y &#061; 13 * cos\u03b8 &#8211; 5 * cos2\u03b8 &#8211; 2 * cos3\u03b8 &#8211; cos4\u03b8<br \/>\n\u901a\u8fc7\u904d\u53860\u52302\u03c0\u7684\u03b8\u503c&#xff0c;\u8ba1\u7b97\u51fa\u8fde\u7eed\u7684\u5750\u6807\u70b9\u5f62\u6210\u95ed\u5408\u66f2\u7ebf\u3002<\/li>\n<\/ul>\n<hr \/>\n<p>\u52a8\u753b\u5b9e\u73b0\u903b\u8f91\u8be6\u7ec6\u8bf4\u660e<\/p>\n<li>\u521d\u59cb\u5316\u8bbe\u7f6e\u9636\u6bb5&#xff1a;<\/li>\n<ul>\n<li>\u4f7f\u7528Python\u7684turtle\u6a21\u5757\u521b\u5efa\u7ed8\u56fe\u7a97\u53e3<\/li>\n<li>\u8bbe\u7f6e\u753b\u5e03\u5c3a\u5bf8\u4e3a\u5bbd\u5ea6800\u50cf\u7d20&#xff0c;\u9ad8\u5ea6600\u50cf\u7d20&#xff08;turtle.setup(800,600)&#xff09;<\/li>\n<li>\u9690\u85cf\u753b\u7b14\u7bad\u5934\u663e\u793a&#xff08;turtle.hideturtle()&#xff09;&#xff0c;\u907f\u514d\u5e72\u6270\u89c6\u89c9\u6548\u679c<\/li>\n<li>\u5c06\u7ed8\u5236\u901f\u5ea6\u8bbe\u7f6e\u4e3a\u6700\u5feb&#xff08;turtle.speed(0)&#xff09;&#xff0c;\u786e\u4fdd\u52a8\u753b\u6d41\u7545\u8fd0\u884c<\/li>\n<li>\u521d\u59cb\u5316\u753b\u7b14\u4f4d\u7f6e\u4e3a\u753b\u5e03\u4e2d\u5fc3&#xff08;0,0&#xff09;<\/li>\n<\/ul>\n<li>\u989c\u8272\u6e10\u53d8\u5b9e\u73b0&#xff1a;<\/li>\n<ul>\n<li>\u5b9a\u4e49\u8d77\u59cb\u989c\u8272RGB\u503c\u4e3a(1.0, 0.2, 0.2)&#xff0c;\u5448\u73b0\u660e\u4eae\u7684\u7ea2\u8272<\/li>\n<li>\u7ec8\u6b62\u989c\u8272RGB\u503c\u4e3a(1.0, 0.0, 0.0)&#xff0c;\u5448\u73b0\u7eaf\u7ea2\u8272<\/li>\n<li>\u572830\u6b21\u5faa\u73af\u4e2d&#xff0c;\u4f7f\u7528\u7ebf\u6027\u63d2\u503c\u7b97\u6cd5\u8ba1\u7b97\u6e10\u53d8\u989c\u8272&#xff1a;\n<ul>\n<li>\u6bcf\u6b21\u5faa\u73af\u7ea2\u8272\u5206\u91cf\u4fdd\u63011.0\u4e0d\u53d8<\/li>\n<li>\u7eff\u8272\u5206\u91cf\u4ece0.2\u7ebf\u6027\u9012\u51cf\u52300.0<\/li>\n<li>\u84dd\u8272\u5206\u91cf\u4ece0.2\u7ebf\u6027\u9012\u51cf\u52300.0<\/li>\n<\/ul>\n<\/li>\n<li>\u793a\u4f8b&#xff1a;\u7b2c15\u6b21\u5faa\u73af\u65f6\u7684\u989c\u8272\u4e3aRGB(1.0, 0.1, 0.1)<\/li>\n<\/ul>\n<li>\u52a8\u6001\u7f29\u653e\u8fc7\u7a0b&#xff1a;<\/li>\n<ul>\n<li>\u521d\u59cb\u7ed8\u5236\u57fa\u672c\u56fe\u5f62&#xff08;\u5982\u5706\u5f62\u6216\u6b63\u65b9\u5f62&#xff09;<\/li>\n<li>\u6bcf\u6b21\u5faa\u73af\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c&#xff1a;\n<ul>\n<li>\u6e05\u9664\u524d\u4e00\u6b21\u7ed8\u5236&#xff08;turtle.clear()&#xff09;<\/li>\n<li>\u5e94\u75281.1\u500d\u7684\u7f29\u653e\u7cfb\u6570&#xff08;\u56fe\u5f62\u5c3a\u5bf8\u4e58\u4ee51.1&#xff09;<\/li>\n<li>\u66f4\u65b0\u5f53\u524d\u7ed8\u5236\u989c\u8272<\/li>\n<li>\u91cd\u65b0\u7ed8\u5236\u653e\u5927\u540e\u7684\u56fe\u5f62<\/li>\n<\/ul>\n<\/li>\n<li>\u7f29\u653e\u6548\u679c&#xff1a;\n<ul>\n<li>\u7b2c1\u6b21&#xff1a;\u539f\u59cb\u5927\u5c0f&#xff08;\u57fa\u51c6\u5c3a\u5bf8&#xff09;<\/li>\n<li>\u7b2c10\u6b21&#xff1a;\u653e\u5927\u81f3\u7ea62.59\u500d&#xff08;1.1^10&#xff09;<\/li>\n<li>\u7b2c30\u6b21&#xff1a;\u653e\u5927\u81f3\u7ea617.45\u500d&#xff08;1.1^30&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\u6700\u7ec8\u5f62\u6210\u89c6\u89c9\u4e0a\u7684\u81a8\u80c0\u6548\u679c&#xff0c;\u7c7b\u4f3c\u6c14\u7403\u5145\u6c14\u8fc7\u7a0b<\/li>\n<\/ul>\n<p>\u6ce8\u610f\u4e8b\u9879&#xff1a;<\/p>\n<ul>\n<li>\u5efa\u8bae\u5728\u6bcf\u6b21\u91cd\u7ed8\u524d\u52a0\u5165\u77ed\u6682\u5ef6\u8fdf&#xff08;\u5982turtle.delay(10)&#xff09;<\/li>\n<li>\u53ef\u914d\u5408\u7ebf\u6761\u7c97\u7ec6\u8c03\u6574\u589e\u5f3a\u7acb\u4f53\u6548\u679c<\/li>\n<li>\u5faa\u73af\u7ed3\u675f\u65f6\u5e94\u4fdd\u7559\u6700\u7ec8\u56fe\u5f62&#xff0c;\u6216\u6dfb\u52a0\u7206\u70b8\/\u6d88\u5931\u7279\u6548<\/li>\n<\/ul>\n<hr \/>\n<h4>\u4ee3\u7801\u7ec6\u8282\u89e3\u6790<\/h4>\n<p>def draw_heart():<br \/>\n    t.clear()  # \u6e05\u9664\u4e0a\u4e00\u5e27<br \/>\n    t.penup()<br \/>\n    t.goto(0, -150)<br \/>\n    t.pendown()<\/p>\n<p>    # \u6839\u636e\u89d2\u5ea6\u8ba1\u7b97\u7231\u5fc3\u5750\u6807<br \/>\n    for i in range(600):<br \/>\n        angle &#061; 0.1 * i<br \/>\n        dx &#061; 16 * (math.sin(angle) ** 3)<br \/>\n        dy &#061; 13 * math.cos(angle) &#8211; 5 * math.cos(2*angle) &#8211; 2 * math.cos(3*angle) &#8211; math.cos(4*angle)<br \/>\n        x, y &#061; dx * size, dy * size  # size\u63a7\u5236\u7f29\u653e\u6bd4\u4f8b<br \/>\n        t.goto(x, y)<\/p>\n<p>    # \u5728\u7231\u5fc3\u4e2d\u5fc3\u6dfb\u52a0\u6587\u5b57<br \/>\n    t.penup()<br \/>\n    t.goto(0, 50)<br \/>\n    t.color(&#039;white&#039;)<br \/>\n    t.write(message, align&#061;&#034;center&#034;, font&#061;(&#034;Arial&#034;, 24, &#034;bold&#034;))<\/p>\n<hr \/>\n<h4>\u5b8c\u6574\u4ee3\u7801<\/h4>\n<p>import math<br \/>\nimport turtle<br \/>\nimport time<\/p>\n<p># \u521d\u59cb\u5316\u8bbe\u7f6e<br \/>\nt &#061; turtle.Turtle()<br \/>\nscreen &#061; turtle.Screen()<br \/>\nscreen.bgcolor(&#039;black&#039;)<br \/>\nscreen.setup(800, 600)<br \/>\nt.hideturtle()<br \/>\nt.speed(0)<br \/>\nmessage &#061; &#034;Python\u2764\ufe0f&#034;<\/p>\n<p># \u7231\u5fc3\u7ed8\u5236\u51fd\u6570<br \/>\ndef draw_heart():<br \/>\n    t.clear()<br \/>\n    t.penup()<br \/>\n    t.goto(0, -150)<br \/>\n    t.pendown()<\/p>\n<p>    # \u989c\u8272\u6e10\u53d8\u8ba1\u7b97<br \/>\n    r &#061; 1.0 &#8211; min(1.0, size\/30)<br \/>\n    g &#061; max(0.2, 0.2 &#8211; size\/50)<br \/>\n    b &#061; max(0.0, 0.2 &#8211; size\/30)<br \/>\n    t.color(r, g, b)<br \/>\n    t.begin_fill()<\/p>\n<p>    # \u53c2\u6570\u65b9\u7a0b\u751f\u6210\u7231\u5fc3<br \/>\n    for i in range(600):<br \/>\n        angle &#061; 0.1 * i<br \/>\n        dx &#061; 16 * (math.sin(angle) ** 3)<br \/>\n        dy &#061; 13 * math.cos(angle) &#8211; 5 * math.cos(2*angle) &#8211; 2 * math.cos(3*angle) &#8211; math.cos(4*angle)<br \/>\n        x, y &#061; dx * size, dy * size<br \/>\n        t.goto(x, y)<\/p>\n<p>    t.end_fill()<br \/>\n    t.penup()<br \/>\n    t.goto(0, 50)<br \/>\n    t.color(&#039;white&#039;)<br \/>\n    t.write(message, align&#061;&#034;center&#034;, font&#061;(&#034;Arial&#034;, 24, &#034;bold&#034;))<\/p>\n<p># \u4e3b\u5faa\u73af<br \/>\nsize &#061; 1<br \/>\nfor _ in range(30):<br \/>\n    draw_heart()<br \/>\n    size *&#061; 1.1<br \/>\n    time.sleep(0.1)<\/p>\n<p>turtle.done()<\/p>\n<hr \/>\n<p>\u6269\u5c55\u5efa\u8bae<\/p>\n<li>\n<p>\u81ea\u5b9a\u4e49\u663e\u793a\u6587\u5b57<\/p>\n<ul>\n<li>\u4fee\u6539message\u53d8\u91cf\u5185\u5bb9\u53ef\u4ee5\u6539\u53d8\u7231\u5fc3\u4e2d\u5fc3\u663e\u793a\u7684\u6587\u5b57<\/li>\n<li>\u793a\u4f8b&#xff1a;message &#061; &#034;I \u2764 Python&#034; \u6216 message &#061; &#034;Happy Coding&#034;<\/li>\n<li>\u652f\u6301\u591a\u884c\u6587\u672c\u663e\u793a&#xff0c;\u53ea\u9700\u5728\u5b57\u7b26\u4e32\u4e2d\u6dfb\u52a0\u6362\u884c\u7b26\\\\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u52a8\u753b\u901f\u5ea6\u8c03\u6574<\/p>\n<ul>\n<li>\u901a\u8fc7\u4fee\u6539size *&#061; 1.1\u4e2d\u7684\u7cfb\u6570\u6765\u6539\u53d8\u7231\u5fc3\u81a8\u80c0\u901f\u5ea6<\/li>\n<li>\u5efa\u8bae\u503c\u8303\u56f4&#xff1a;1.01-1.2&#xff08;\u6570\u503c\u8d8a\u5927\u52a8\u753b\u8d8a\u5feb&#xff09;<\/li>\n<li>\u4f8b\u5982&#xff1a;size *&#061; 1.05&#xff08;\u6162\u901f&#xff09;\u6216 size *&#061; 1.15&#xff08;\u5feb\u901f&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u989c\u8272\u81ea\u5b9a\u4e49<\/p>\n<ul>\n<li>\u4fee\u6539RGB\u503c\u521b\u5efa\u4e0d\u540c\u989c\u8272\u7684\u7231\u5fc3<\/li>\n<li>\u5b8c\u6574\u989c\u8272\u53c2\u6570\u793a\u4f8b&#xff1a;t.color(1,0.5,0.8) \u521b\u5efa\u7c89\u8272\u7231\u5fc3<\/li>\n<li>\u53ef\u5c1d\u8bd5&#xff1a;\n<ul>\n<li>\u7ea2\u8272&#xff1a;(1,0,0)<\/li>\n<li>\u7d2b\u8272&#xff1a;(0.5,0,1)<\/li>\n<li>\u9752\u8272&#xff1a;(0,1,1)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u6269\u5c55\u7ed8\u5236\u529f\u80fd<\/p>\n<ul>\n<li>\u5728\u5faa\u73af\u7ed3\u675f\u540e\u6dfb\u52a0t.goto(x,y)\u53ef\u7ed8\u5236\u989d\u5916\u88c5\u9970<\/li>\n<li>\u793a\u4f8b&#xff1a;\n<ul>\n<li>t.goto(0,200) \u7ed8\u5236\u9876\u90e8\u88c5\u9970<\/li>\n<li>t.goto(-100,-150) \u7ed8\u5236\u5de6\u4e0b\u89d2\u56fe\u6848<\/li>\n<\/ul>\n<\/li>\n<li>\u53ef\u914d\u5408t.begin_fill()\u548ct.end_fill()\u521b\u5efa\u586b\u5145\u56fe\u5f62<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u6559\u80b2\u5e94\u7528<\/p>\n<ul>\n<li>\u8fd9\u6bb5\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u7528\u57fa\u7840\u6570\u5b66&#xff08;\u4e09\u89d2\u51fd\u6570&#xff09;\u548c\u7f16\u7a0b&#xff08;\u5faa\u73af\u3001\u51fd\u6570&#xff09;\u521b\u9020\u89c6\u89c9\u827a\u672f<\/li>\n<li>\u9002\u5408\u4f5c\u4e3a\u7f16\u7a0b\u542f\u8499\u7684\u8da3\u5473\u6848\u4f8b&#xff0c;\u53ef\u4ee5&#xff1a;\n<ul>\n<li>\u8bb2\u89e3\u6781\u5750\u6807\u7ed8\u56fe\u539f\u7406<\/li>\n<li>\u6f14\u793a\u5faa\u73af\u53d8\u91cf\u7684\u4f5c\u7528<\/li>\n<li>\u4ecb\u7ecd\u8ba1\u7b97\u673a\u56fe\u5f62\u5b66\u57fa\u7840<\/li>\n<\/ul>\n<\/li>\n<li>\u6269\u5c55\u65b9\u5411&#xff1a;\n<ul>\n<li>\u6dfb\u52a0\u7528\u6237\u4ea4\u4e92\u529f\u80fd<\/li>\n<li>\u5b9e\u73b0\u591a\u4e2a\u7231\u5fc3\u540c\u65f6\u7ed8\u5236<\/li>\n<li>\u521b\u5efa\u7231\u5fc3\u70df\u82b1\u52a8\u753b\u6548\u679c<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<p>\u6ce8&#xff1a;\u6240\u6709\u4fee\u6539\u5efa\u8bae\u90fd\u57fa\u4e8e\u539f\u7231\u5fc3\u7ed8\u5236\u4ee3\u7801\u6846\u67b6&#xff0c;\u4fdd\u6301\u6838\u5fc3\u7b97\u6cd5\u4e0d\u53d8&#xff0c;\u4ec5\u8c03\u6574\u53c2\u6570\u548c\u6dfb\u52a0\u8f85\u52a9\u529f\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb430\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf15\u6b21\u3002\u8fd9\u6bb5\u4ee3\u7801\u901a\u8fc7\u6570\u5b66\u516c\u5f0f\u548c\u56fe\u5f62\u5e93\u7ed3\u5408\uff0c\u751f\u6210\u4e00\u4e2a\u9010\u6e10\u81a8\u80c0\u7684\u7ea2\u8272\u7231\u5fc3\u52a8\u753b\uff0c\u5e76\u4f34\u968f\u6587\u5b57\u6807\u7b7e\u3002\u4f7f\u7528\u6570\u5b66\u51fd\u6570\u5b9a\u4e49\u7231\u5fc3\u5f62\u72b6\u901a\u8fc7\u5faa\u73af\u5b9e\u73b0\u52a8\u753b\u6548\u679c\u6dfb\u52a0\u6587\u5b57\u4ea4\u4e92\u5143\u7d20\u6838\u5fc3\u6a21\u5757\u8bf4\u660eturtle\u662fPython\u5185\u7f6e\u7684\u7ed8\u56fe\u5e93\uff0c\u57fa\u4e8etkinter\u5b9e\u73b0\uff0c\u6a21\u62df\u753b\u5bb6\u5728\u753b\u5e03\u4e0a\u4f7f\u7528\u753b\u7b14\u4f5c\u753b\u7684\u884c\u4e3a\u3002\u8fd9\u4e2a\u6a21\u5757\u7279\u522b\u9002\u5408\u521d\u5b66\u8005\u5b66\u4e60\u7f16\u7a0b\u6982\u5ff5\uff0c\u4e5f\u5e38\u7528\u4e8e\u53ef\u89c6\u5316\u6559\u5b66\u548c\u7b80\u5355\u56fe\u5f62\u7ed8\u5236\u3002\uff1a\u62ac\u8d77\u753b\u7b14\uff08\u79fb\u52a8\u65f6\u4e0d\u753b\u7ebf\uff09\u6267\u884c\u6b64\u547d\u4ee4\u540e\uff0c\u6d77\u9f9f\u79fb\u52a8\u4e0d\u4f1a\u7559\u4e0b\u75d5\u8ff9\u5e38\u7528\u4e8e\u5c06\u753b\u7b14\u79fb\u52a8\u5230\u65b0\u7684\u8d77\u59cb\u4f4d\u7f6e\u800c\u4e0d\u7ed8\u5236\u591a\u4f59\u7684\u7ebf\u6761\u6216\uff1a\u843d\u4e0b\u753b\u7b14\u4e0epenup\u76f8\u53cd\uff0c\u4f7f\u6d77\u9f9f\u79fb\u52a8\u65f6\u7ed8\u5236\u7ebf\u6761\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[81,4593,190,4592],"topic":[],"class_list":["post-47779","post","type-post","status-publish","format-standard","hentry","category-server","tag-python","tag-4593","tag-190","tag-4592"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u65b0\u624b\u5411:\u521b\u610fPython\u7231\u5fc3\u4ee3\u7801 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/47779.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u65b0\u624b\u5411:\u521b\u610fPython\u7231\u5fc3\u4ee3\u7801 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb430\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf15\u6b21\u3002\u8fd9\u6bb5\u4ee3\u7801\u901a\u8fc7\u6570\u5b66\u516c\u5f0f\u548c\u56fe\u5f62\u5e93\u7ed3\u5408\uff0c\u751f\u6210\u4e00\u4e2a\u9010\u6e10\u81a8\u80c0\u7684\u7ea2\u8272\u7231\u5fc3\u52a8\u753b\uff0c\u5e76\u4f34\u968f\u6587\u5b57\u6807\u7b7e\u3002\u4f7f\u7528\u6570\u5b66\u51fd\u6570\u5b9a\u4e49\u7231\u5fc3\u5f62\u72b6\u901a\u8fc7\u5faa\u73af\u5b9e\u73b0\u52a8\u753b\u6548\u679c\u6dfb\u52a0\u6587\u5b57\u4ea4\u4e92\u5143\u7d20\u6838\u5fc3\u6a21\u5757\u8bf4\u660eturtle\u662fPython\u5185\u7f6e\u7684\u7ed8\u56fe\u5e93\uff0c\u57fa\u4e8etkinter\u5b9e\u73b0\uff0c\u6a21\u62df\u753b\u5bb6\u5728\u753b\u5e03\u4e0a\u4f7f\u7528\u753b\u7b14\u4f5c\u753b\u7684\u884c\u4e3a\u3002\u8fd9\u4e2a\u6a21\u5757\u7279\u522b\u9002\u5408\u521d\u5b66\u8005\u5b66\u4e60\u7f16\u7a0b\u6982\u5ff5\uff0c\u4e5f\u5e38\u7528\u4e8e\u53ef\u89c6\u5316\u6559\u5b66\u548c\u7b80\u5355\u56fe\u5f62\u7ed8\u5236\u3002\uff1a\u62ac\u8d77\u753b\u7b14\uff08\u79fb\u52a8\u65f6\u4e0d\u753b\u7ebf\uff09\u6267\u884c\u6b64\u547d\u4ee4\u540e\uff0c\u6d77\u9f9f\u79fb\u52a8\u4e0d\u4f1a\u7559\u4e0b\u75d5\u8ff9\u5e38\u7528\u4e8e\u5c06\u753b\u7b14\u79fb\u52a8\u5230\u65b0\u7684\u8d77\u59cb\u4f4d\u7f6e\u800c\u4e0d\u7ed8\u5236\u591a\u4f59\u7684\u7ebf\u6761\u6216\uff1a\u843d\u4e0b\u753b\u7b14\u4e0epenup\u76f8\u53cd\uff0c\u4f7f\u6d77\u9f9f\u79fb\u52a8\u65f6\u7ed8\u5236\u7ebf\u6761\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/47779.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-30T01:17:39+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/47779.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/47779.html\",\"name\":\"\u65b0\u624b\u5411:\u521b\u610fPython\u7231\u5fc3\u4ee3\u7801 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-07-30T01:17:39+00:00\",\"dateModified\":\"2025-07-30T01:17:39+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/47779.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/47779.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/47779.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u65b0\u624b\u5411:\u521b\u610fPython\u7231\u5fc3\u4ee3\u7801\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u65b0\u624b\u5411:\u521b\u610fPython\u7231\u5fc3\u4ee3\u7801 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/47779.html","og_locale":"zh_CN","og_type":"article","og_title":"\u65b0\u624b\u5411:\u521b\u610fPython\u7231\u5fc3\u4ee3\u7801 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb430\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf15\u6b21\u3002\u8fd9\u6bb5\u4ee3\u7801\u901a\u8fc7\u6570\u5b66\u516c\u5f0f\u548c\u56fe\u5f62\u5e93\u7ed3\u5408\uff0c\u751f\u6210\u4e00\u4e2a\u9010\u6e10\u81a8\u80c0\u7684\u7ea2\u8272\u7231\u5fc3\u52a8\u753b\uff0c\u5e76\u4f34\u968f\u6587\u5b57\u6807\u7b7e\u3002\u4f7f\u7528\u6570\u5b66\u51fd\u6570\u5b9a\u4e49\u7231\u5fc3\u5f62\u72b6\u901a\u8fc7\u5faa\u73af\u5b9e\u73b0\u52a8\u753b\u6548\u679c\u6dfb\u52a0\u6587\u5b57\u4ea4\u4e92\u5143\u7d20\u6838\u5fc3\u6a21\u5757\u8bf4\u660eturtle\u662fPython\u5185\u7f6e\u7684\u7ed8\u56fe\u5e93\uff0c\u57fa\u4e8etkinter\u5b9e\u73b0\uff0c\u6a21\u62df\u753b\u5bb6\u5728\u753b\u5e03\u4e0a\u4f7f\u7528\u753b\u7b14\u4f5c\u753b\u7684\u884c\u4e3a\u3002\u8fd9\u4e2a\u6a21\u5757\u7279\u522b\u9002\u5408\u521d\u5b66\u8005\u5b66\u4e60\u7f16\u7a0b\u6982\u5ff5\uff0c\u4e5f\u5e38\u7528\u4e8e\u53ef\u89c6\u5316\u6559\u5b66\u548c\u7b80\u5355\u56fe\u5f62\u7ed8\u5236\u3002\uff1a\u62ac\u8d77\u753b\u7b14\uff08\u79fb\u52a8\u65f6\u4e0d\u753b\u7ebf\uff09\u6267\u884c\u6b64\u547d\u4ee4\u540e\uff0c\u6d77\u9f9f\u79fb\u52a8\u4e0d\u4f1a\u7559\u4e0b\u75d5\u8ff9\u5e38\u7528\u4e8e\u5c06\u753b\u7b14\u79fb\u52a8\u5230\u65b0\u7684\u8d77\u59cb\u4f4d\u7f6e\u800c\u4e0d\u7ed8\u5236\u591a\u4f59\u7684\u7ebf\u6761\u6216\uff1a\u843d\u4e0b\u753b\u7b14\u4e0epenup\u76f8\u53cd\uff0c\u4f7f\u6d77\u9f9f\u79fb\u52a8\u65f6\u7ed8\u5236\u7ebf\u6761\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/47779.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-07-30T01:17:39+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/47779.html","url":"https:\/\/www.wsisp.com\/helps\/47779.html","name":"\u65b0\u624b\u5411:\u521b\u610fPython\u7231\u5fc3\u4ee3\u7801 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-07-30T01:17:39+00:00","dateModified":"2025-07-30T01:17:39+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/47779.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/47779.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/47779.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u65b0\u624b\u5411:\u521b\u610fPython\u7231\u5fc3\u4ee3\u7801"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/47779","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=47779"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/47779\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=47779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=47779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=47779"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=47779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}