00

import turtle
turtle.setup(600,400,0,0)

turtle.bgcolor('red')
turtle.pencolor('yellow')
turtle.fillcolor('yellow')


def mygoto(x,y):
    turtle.penup()
    turtle.goto(x,y)
    turtle.pendown()
mygoto(-250,100)
turtle.begin_fill()
for i in range(5):
    turtle.forward(100)
    turtle.right(144)
turtle.end_fill()
mygoto(-100,155)
turtle.begin_fill()
for i in range(5):
    turtle.forward(25)
    turtle.right(144)
turtle.end_fill()
mygoto(-55,125)
turtle.begin_fill()
for i in range(5):
    turtle.forward(25)
    turtle.right(144)
turtle.end_fill()
mygoto(-55,65)
turtle.begin_fill()
for i in range(5):
    turtle.forward(25)
    turtle.right(144)
turtle.end_fill()
mygoto(-100,25)
turtle.begin_fill()
for i in range(5):
    turtle.forward(25)
    turtle.right(144)
turtle.end_fill()
turtle.done()

猜你喜欢

转载自www.cnblogs.com/xiefei33--/p/9047897.html
00