打开python
ctrl+n新建
输入
import turtle as t
t.setup(500,500) #设置画布大小
t.pensize(5) #设置画笔尺寸
t.color("red","blue")#设置颜色
t.begin_fill()#画笔开始填充
for i in range(3):
t.fd(200)#画笔向前画100像素单位
t.left(120)#左拐120度
t.end_fill()#结束填充
t.done()#程序运行完,画布画体不关闭