import turtle 
pi =  3.14159265
wn = turtle.Screen()
germ = turtle.Turtle()
germ.color("black")
germ.speed(0)
germ.turtlesize(0.0001)
def type1(col1,col2,col3):
    def rectangle(color):
        germ.begin_fill()
        germ.color(color)
        for i in range (1,3):
            germ.forward(100)
            germ.left(90)
            germ.forward(300)
            germ.left(90)
        germ.end_fill()
    rectangle(col1)
    germ.forward(100)
    rectangle(col2)
    germ.forward(100)
    rectangle(col3)
def type2(col1,col2,col3):
    def rectangle(color):
        germ.begin_fill()
        germ.color(color)
        for i in range (1,3):
            germ.forward(300)
            germ.left(90)
            germ.forward(100)
            germ.left(90)
        germ.end_fill()
    rectangle(col1)
    germ.right(90)
    germ.forward(100)
    germ.left(90)
    rectangle(col2)
    germ.right(90)
    germ.forward(100)
    germ.left(90)
    rectangle(col3)
type1("blue","white","red")
germ.penup()
germ.backward(200)
germ.right(90)
germ.forward(100)
germ.left(90)
germ.pendown()
type2("black","red","yellow")
germ.penup()
germ.backward(300)
germ.left(90)
germ.forward(200)
germ.right(90)
germ.pendown()
type2("red","white","navyblue")
germ.penup()
germ.left(90)
germ.forward(500)
germ.right(90)
germ.pendown()
type2("red","white","Light sky blue")
germ.penup()
germ.setposition(-300,-300)
germ.setheading(0)
germ.pendown()
def reclange(color):
    germ.begin_fill()
    germ.color(color)
    for i in range (1,3):
        germ.forward(200)
        germ.left(90)
        germ.forward(600)
        germ.left(90)
    germ.end_fill()
reclange("black")
germ.forward(200)
reclange("yellow")
germ.forward(200)
reclange("red")
germ.penup()
germ.setposition(-300,-300)
germ.setheading(0)
germ.pendown()
germ.begin_fill()
germ.color("navy blue")
for i in range (1,5):
    germ.forward(600)
    germ.left(90)
germ.end_fill()
germ.penup()
germ.color('red')
germ.setposition(110,-160)
germ.pendown()
def etoile(couleuretoile):
    germ.setheading(0)
    germ.begin_fill()
    germ.color(couleuretoile)
    for i in range (1,6):
        germ.forward(20)
        germ.right(180-36)
        germ.forward(20)
        germ.left(180-108)
    germ.end_fill()
    germ.left(30)
def couronne():
    for i in range (1,13):
        germ.setheading(0)
        germ.penup()
        germ.left(90+30*i)
        germ.forward(200)
        germ.right(150)
        germ.forward(200)
        germ.left(90)
        germ.pendown()
        etoile("yellow") 
couronne()
wn.mainloop()
