五星红旗代码

from turtle import*
import  time

x=(-600,-430,-360,-380,-440)
y=(300,400,300,200,100)
penup()
goto(x[0], y[0])
pensize('5')
pencolor('yellow')
fillcolor('yellow')
begin_fill()
bgcolor('red')
speed(10)


pendown()
for i in range(5):
    fd(100)
    right(144)
    fd(100)
    left(72)

penup()
goto(x[1], y[1])
pendown()
for i in range(5):
    fd(30)
    right(144)
    fd(30)
    left(72)

end_fill()
penup()
goto(x[2],y[2])
pendown()
begin_fill()
for i in range(5):
    fd(30)
    right(144)
    fd(30)
    left(72)

end_fill()
penup()
goto(x[3],y[3])
pendown()
begin_fill()
for i in range(5):
    fd(30)
    right(144)
    fd(30)
    left(72)
end_fill()
penup()

goto(x[4],y[4])
pendown()
begin_fill()
for i in range(5):
    fd(30)
    right(144)
    fd(30)
    left(72)

end_fill()
done()

你可能感兴趣的:(python)