画一个五星红旗

import turtle
turtle.fillcolor("yellow")
turtle.bgcolor("red")
turtle.color("yellow")
#大星星
turtle.up()
turtle.goto(-600,200)
turtle.begin_fill()
for i in range(5):
    turtle.forward(200)
    turtle.right(144)
turtle.end_fill()

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

#第二颗小星星
turtle.up()
turtle.goto(-260,220)
turtle.begin_fill()
turtle.left(12)
for i in range(5):
    turtle.forward(45)
    turtle.right(144)
turtle.end_fill()

#第三颗小星星
turtle.up()
turtle.goto(-200,130)
turtle.begin_fill()
turtle.left(170)
for i in range(5):
    turtle.forward(45)
    turtle.right(144)
turtle.end_fill()

#第三颗小星星
turtle.up()
turtle.goto(-300,30)
turtle.begin_fill()
turtle.left(170)
for i in range(5):
    turtle.forward(45)
    turtle.right(144)
turtle.end_fill()

效果如下:

原文地址:https://www.cnblogs.com/garxiu/p/7506651.html