Module 1

Computational thinking (Python & Turtle)

Quick-reference revision notes for parents.

1.1 Decomposition

Decomposition = breaking a big problem into smaller, more manageable parts.

Example — making a sandwich

Decomposed: 1) get bread, 2) butter it, 3) add filling, 4) close, 5) cut. Each step is small enough to do without thinking.

Make a sandwich Get bread Add filling Cut & serve → slice, place → butter, layer → cut, plate
Decomposition: one big problem at the top, smaller pieces underneath.

1.2 Abstraction

Abstraction = hiding the details that don't matter and keeping only what does.

1.3 Pattern recognition

Spot the parts of a problem that repeat or look similar. If you can find a pattern, a loop or a function will save lots of typing.

Example — Python Turtle drawing a square

Without a loop:

import turtle
t = turtle.Turtle()
t.forward(100)
t.right(90)
t.forward(100)
t.right(90)
t.forward(100)
t.right(90)
t.forward(100)
t.right(90)

With a loop (pattern recognised):

for i in range(4):
    t.forward(100)
    t.right(90)

1.4 Pattern recognition with subroutines

A subroutine (also called a function) is a named block of code you can call whenever you need it.

def draw_square(size):
    for i in range(4):
        t.forward(size)
        t.right(90)

draw_square(50)
draw_square(100)
draw_square(150)

1.5 Algorithms

An algorithm is a step-by-step set of instructions to solve a problem. They can be written as:

Flow chart shapes

Start/End Terminator Input/Output Parallelogram Process Rectangle Decision Diamond
The four shapes you'll use most. Arrows show the order of flow.
Example — pseudocode
INPUT age
IF age >= 18 THEN
    OUTPUT "You can vote"
ELSE
    OUTPUT "Too young"
END IF
Start Input password Correct? Yes Output "Welcome" End No
Password-loop algorithm. The "No" branch loops back to ask again.

1.6 Challenges

Putting it all together: shape challenges (squares, triangles, polygons) and maze challenges (navigate the turtle through a path). Use:

Quick reference

← Back All modules Next → Practice questions