import turtle def mygoto(x, y): turtle.up() turtle.goto(x, y) turtle.down() def drawwjx(x): turtle.begin_fill() for i in range(5): turtle.forward(x) turtle.right(144) #星星的角度 turtle.end_fill() turtle.setup(1000,700,0,0) turtle.color('yellow') #画笔的颜色 turtle.bgcolor('red') #画布的颜色 turtle.fillcolor('yellow') #星星填充的颜色 mygoto(-400,175) drawwjx(150) #第一个小五角星 mygoto(-195,275) turtle.right(25) drawwjx(50) #第二个小五角星 mygoto(-135,200) turtle.left(50) drawwjx(50) #第三个小五角星 mygoto(-135,120) turtle.right(25) drawwjx(50) #第四个小五角星 mygoto(-195,35) turtle.left(50) drawwjx(50) mygoto(0, 0) turtle.hideturtle() print(turtle.time.clock()) turtle.done()