import turtle

#the background
turtle.pensize(1)
turtle.color('red')
turtle.begin_fill()
turtle.setup(1000,1000,0,0)
turtle.penup()
turtle.goto(0,0)
turtle.pendown()
turtle.fd(300)
turtle.rt(90)
turtle.fd(200)
turtle.rt(90)
turtle.fd(300)
turtle.rt(90)
turtle.fd(200)
turtle.end_fill()

#the first star
turtle.color('yellow','yellow')
turtle.pensize(1)
turtle.begin_fill()
turtle.penup()
turtle.goto(20,-40)
turtle.seth(0)
turtle.pendown()
for i in range(5):
turtle.fd(60)
turtle.rt(144)
turtle.end_fill()

#the second star
turtle.begin_fill()
turtle.penup()
turtle.goto(110,-20)
turtle.seth(120)
turtle.pendown()
for i in range(5):
turtle.fd(20)
turtle.lt(144)
turtle.end_fill()

#the third star
turtle.begin_fill()
turtle.penup()
turtle.goto(120,-50)
turtle.seth(60)
turtle.pendown()
for i in range(5):
turtle.fd(20)
turtle.lt(144)
turtle.end_fill()

#the fourth star
turtle.begin_fill()
turtle.penup()
turtle.goto(110,-70)
turtle.seth(0)
turtle.pendown()
for i in range(5):
turtle.fd(20)
turtle.rt(144)
turtle.end_fill()

#the fifth star
turtle.begin_fill()
turtle.penup()
turtle.goto(100,-100)
turtle.seth(90)
turtle.pendown()
for i in range(5):
turtle.fd(20)
turtle.lt(144) 

turtle.end_fill()

turtle.hideturtle()
turtle.done()

 

posted on 2020-03-24 15:13  叫你一声你敢应吗  阅读(239)  评论(0编辑  收藏  举报