一、普通五角星
这里要注意循环语句的使用
for i in range(5):
tl.pensize(10)
tl.pencolor(1,0,1)
tl.fd(200)
tl.right(144)
效果图:
第二种、空心五角星
tl.penup() #将画笔设置为飞行模式
tl.fd(-150) #将画笔向左移动200像素
tl.pendown() #将画笔设置为爬型工作模式
tl.pensize(10)
tl.pencolor(1,1,0)
tl.bgcolor('black')
tl.begin_fill()
#tl.color('yellow','red')