画五星红旗

import turtle


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

def drawStart(localx,localy,size):
    turtle.begin_fill()
    turtle.up()
    turtle.goto(localx,localy)
    turtle.down()
    for i in range(5):
        turtle.forward(size)
        turtle.right(144)
        turtle.color('yellow')
    turtle.end_fill()


def drawsmallStart(localx,localy,size):
    turtle.begin_fill()
    turtle.up()
    turtle.goto(localx,localy)
    turtle.down()
    for i in range(5):
        turtle.forward(size)
        turtle.left(144)
        turtle.color('yellow')
    turtle.end_fill()





drawStart(-300, 150, 100)
drawsmallStart(-150, 250,50)
drawsmallStart(-100, 180,50)
drawsmallStart(-108, 95,50)
drawsmallStart(-150, 30,50)

turtle.done()

 

 

posted on 2018-03-20 16:19  hasbb  阅读(157)  评论(0编辑  收藏  举报

导航