不挂科搜题免费

问题:

请编程绘制如下太极图(图中圆半径是100),颜色填充可用以下模式语句 from turtle imp

答案:

import turtle as t t.circle(100) t.begin_fill() t.fillcolor("black") t.circle(50,180) t.circle(-50,180) t.circle(-100,180) t.end_fill() t.penup() t.goto(0,60) t.pendown() t.begin_fill() t.fillcolor("black") t.circle(10) t.end_fill() t.penup() t.goto(0,160) t.pendown() t.begin_fill() t.fillcolor("white") t.circle(10) t.end_fill() t.hideturtle() t.done()