Featured Post

Data Science Concepts

Python Turtle - Draw Germany National Flag In Python Turtle Graphics By #BKTutorial

 





Source Code:

#German Flag

import turtle
t=turtle
t.title("German Flag")
t.speed(1)
t.setup(800, 500)

# Move to start position
t.penup()
t.goto(-400, 250)
t.pendown()

t.color("black")
t.begin_fill()
t.forward(800)
t.right(90)
t.forward(167)
t.right(90)
t.forward(800)
t.end_fill()

t.left(90)

t.color("red")
t.begin_fill()
t.forward(167)
t.left(90)
t.forward(800)
t.left(90)
t.forward(167)
t.end_fill()

t.left(180)
t.penup()
t.forward(167)
t.pendown()

t.color("gold")
t.begin_fill()
t.forward(167)
t.right(90)
t.forward(800)
t.right(90)
t.forward(167)
t.end_fill()

t.hideturtle()


Comments