五星红旗

from turtle import *
fillcolor("yellow")
bgcolor("red")
color("yellow")

#定义goto函数
def my_goto(x,y):
up()
goto(x,y)
down()

#画大星星
my_goto(-600,200)
begin_fill()
for i in range(5):
forward(150)
right(144)
end_fill()

#第一颗小星星
my_goto(-300,300)
begin_fill()
left(30)
for i in range(5):
forward(30)
right(144)
end_fill()

 

#第二颗小星星
my_goto(-260,220)
begin_fill()
left(12)
for i in range(5):
forward(30)
right(144)
end_fill()

#第三颗小星星
my_goto(-200,130)
begin_fill()
left(170)
for i in range(5):
forward(30)
right(144)
end_fill()

#第四颗小星星
my_goto(-300,30)
begin_fill()
left(170)
for i in range(5):
forward(30)
right(144)
end_fill()

posted on 2017-09-13 09:54  01-李嘉秀  阅读(124)  评论(0编辑  收藏  举报

导航