Year 8 Computing • Computer Systems • Lesson 1 • Activity 3

The intelligent piece of paper

Explore how a simple set of instructions can make a sheet of paper seem intelligent. Play against the algorithm, inspect each move, and explain how the logic works.

Algorithms follow rules

This worksheet turns noughts and crosses into a decision-making program using sequence, selection, and repetition.

Focus words

Sequence • IF / ELSE • REPEAT

Play against the paper

You are O. The paper is X. Start the algorithm, then click an empty square when it is your turn.

Press “Start algorithm” to place the first X.

Move-by-move algorithm

Move 0

Draw the noughts and crosses 3×3 grid.

Move 1

Write X in top left-hand corner.

Move 2

IF the bottom right-hand square is empty

THEN write X in the bottom right-hand square

ELSE write X in the bottom left-hand square

Moves 3-4

REPEAT 2 times

IF there is a line with two Xs and an empty square

THEN write X in that empty square (win)

ELSE IF there is a line with two Os and an empty square

THEN write X in that empty square (block opponent)

ELSE write X in any available corner

Move 5

Write X in the remaining available square.

Explain the logic

Fill in the boxes as you test the algorithm.