用python画太极图源代码

时间:2022-05-19 13:39:18 阅读: 最新文章 文档下载
说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。
python语言画太极图的源代码



import turtle t = turtle.Turtle() t.penup() t.goto(0,-50) t.pendown() t.begin_fill()

t.fillcolor("black")

t.circle(150,extent=180) t.circle(75,extent=180) t.circle(-75,extent=180) t.end_fill()

t.circle(-150,extent=180) t.penup() t.goto(0,160) t.pendown() t.begin_fill()

t.fillcolor("white") t.circle(30,extent=360) t.end_fill() t.penup() t.goto(0,0) t.pendown() t.begin_fill()

t.fillcolor("black")

t.circle(30,extent=360) t.end_fill() turtle.done()


本文来源:https://www.wddqw.com/doc/54c3ff6b65ec102de2bd960590c69ec3d5bbdbaf.html