Draw a Kite in Python Turtle
Beginner · Things to draw · 92 lines · draws in about 11 seconds
This program flies a diamond kite made of four coloured triangles, with a wavy tail of bows and a long string across a sky with clouds and a sun.

How the code works
Corners as named points
Naming the five points makes the drawing code read like a description: a triangle from CENTRE to TOP to RIGHT. Change a number here and every shape that uses that corner moves with it.
CENTRE = (40, 95) TOP = (40, 200) RIGHT = (135, 95) BOTTOM = (40, -75) LEFT = (-55, 95)
Clouds from dots
A cloud is four white dots that overlap. The list holds how far each dot is from (x, y) and how big it is.
def cloud(x, y): """A cloud made of four white dots that overlap.""" t.penup() for dx, dy, size in [(-40, 0, 60), (0, 12, 80), (40, 0, 60), (0, -12, 60)]: t.goto(x + dx, y + dy) t.dot(size, "white")
Four triangles
Each quarter of the kite is a triangle with one corner at the centre, and the two colours take turns going round.
triangle(CENTRE, TOP, RIGHT, "crimson") triangle(CENTRE, RIGHT, BOTTOM, "gold") triangle(CENTRE, BOTTOM, LEFT, "crimson") triangle(CENTRE, LEFT, TOP, "gold")
A wavy tail with bows
circle(15, 60) curves one way and circle(-15, 60) curves back, which makes one wave. A bow goes where each wave ends, at the turtle's own position from xcor() and ycor().
for color in ["crimson", "gold", "crimson", "gold"]: t.color("dimgray") t.circle(15, 60) t.circle(-15, 60) bow(t.xcor(), t.ycor(), color)
Make it yours
Change the code above and press Run. Some ideas:
- Add 20 to the y value of all five corner points to fly the kite higher.
- Change
"crimson"to"royalblue"in two of thetriangle()calls for a blue and gold kite. - Change
t.goto(-290, -215)tot.goto(290, -215)so the string runs down to the right.
What it uses
- tuples as points
- functions with parameters
- circle with extent
- xcor and ycor
Every turtle command the site supports is listed on Python turtle online.