import turtle
# 定义一个函数,可以画五角星
def mygoto(x ,y):
turtle.up()
turtle.goto(x, y)
turtle.down()
def draw(x):
turtle.begin_fill()
for i in range(5):
turtle.forward(x)
turtle.right(144)
turtle.end_fill()
turtle.setup(600,400,0,0)
turtle.color('yellow')
turtle.bgcolor('red')
turtle.fillcolor('yellow')
# 速度为3
turtle.speed(3)
mygoto(-250,75)
draw(100)
mygoto(-100,150)
draw(50)
mygoto(-50,100)
draw(50)
mygoto(-50,50)
draw(50)
mygoto(-100,0)
draw(50)
turtle.done()