代码如下:
import turtle as tl
tl.speed(10) # 调整画笔速度为10最高
tl.color('red','red') # 设置画笔颜色和填充颜色均为红色
tl.begin_fill() # 开始绘制
tl.left(140) # 左转140度
tl.forward(111.65) # 前进
for i in range(200):
tl.right(1)
tl.forward(1)
tl.left(120)
for i in range(200):
tl.right(1)
tl.forward(1)
tl.forward(111.65)
tl.end_fill() # 结束绘制
tl.hideturtle() # 隐藏箭头
效果图