import turtle

turtle.bgcolor("red")
turtle.fillcolor("yellow")
turtle.color("yellow")
turtle.setup(600,400,0,0)
turtle.hideturtle()
def my_address(x,y):
    turtle.up()
    turtle.goto(x, y)
    turtle.down()

def draw_star(r):
    turtle.begin_fill()

    for i in range(5):
        turtle.forward(r)
        turtle.left(-144)
    turtle.end_fill()

my_address(-230,100)
draw_star(100)

for i in range(4):
    x=1
    if i in [0,3]:
        x=0
    my_address(-115+x*50,150-i*35)
    turtle.left(15-i*15)
    draw_star(30)
my_address(0,0)
turtle.done()

 

 posted on 2018-03-20 17:47  Runka  阅读(96)  评论(0编辑  收藏  举报