Use these small examples when you need a starting point. Type them into Mu Editor and adapt them.
Colour and size
pencolor("blue")
pensize(3)
circle(50)
Square loop
for i in range(4):
forward(100)
right(90)
Mandala loop
for i in range(12):
circle(50)
right(30)
You Do
Make one change at a time, run the program, then decide what to improve next.
Starter template for supported projects. Type it into Mu Editor, then adapt it.
from turtle import *
shape_size = 50
repeats = 12
turn_angle = 30
pencolor("cyan")
pensize(3)
speed(0)
for i in range(repeats):
circle(shape_size)
right(turn_angle)
done()
Typing the code yourself helps build Python fluency and debugging skills.
Workbook Activity
Share your final artwork and explain one programming choice you made.
WAGOLL
Example code and output.
Compare the example code with the finished Starburst artwork.
Example code
from turtle import *
from random import choice, randint
repeats = 24
shape_size = 80
colours = ["#00DCC8", "#FF5AA0", "#8C46FF", "#EEFF00"]
speed(0)
bgcolor("black")
def draw_starburst(size):
pencolor(choice(colours))
pensize(randint(2, 5))
forward(size)
right(140)
forward(size / 2)
backward(size / 2)
left(140)
backward(size)
for i in range(repeats):
draw_starburst(shape_size)
right(360 / repeats)
done()
Starburst WAGOLL
This WAGOLL combines the key skills from the Creative Coding unit. It uses variables, data types, loops,
selection and random values to create a neon starburst design. Use the comments to identify parts of the
code you can modify to make the design your own.
Click image to enlarge.
Skills Used
VariablesInteger data typesString data typesRandom valuesSelection / IF statementsLoopsDebugging and testingCreative design
Plenary
Evaluate the finished project and explain the programming decisions behind it.
Extension task
Add a function or user input so someone else can change part of your artwork.