Skip to content
Computing · Year 4

Active learning ideas

Decomposing Complex Shapes

Active learning works well for decomposing complex shapes because students need to physically test angle calculations and loop structures to see how geometry and programming interact. Moving from abstract formulas to concrete visual outputs helps students connect mathematical concepts to real-time problem-solving in a way that static worksheets cannot.

National Curriculum Attainment TargetsKS2: Computing - Programming and AlgorithmsKS2: Computing - Computer Science
25–45 minPairs → Whole Class4 activities

Activity 01

Peer Teaching30 min · Pairs

Pair Programming: Polygon Builder

Pairs use a turtle graphics tool to program basic shapes like triangles and octagons. One partner types code while the other predicts outcomes and suggests angles. Switch roles after each shape, then combine into a repeating border.

Analyze how to break a complex pattern into smaller, repeatable steps.

Facilitation TipDuring Pair Programming: Polygon Builder, circulate to listen for students explaining their angle calculations to each other, especially when they test angles like 120 degrees for hexagons.

What to look forPresent students with a visual of a simple compound shape (e.g., a square with a triangle on top). Ask them to write down the sequence of commands they would give a sprite to draw it, identifying any loops or repeated steps.

UnderstandApplyAnalyzeCreateSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 02

Peer Teaching45 min · Small Groups

Small Groups: Nested Loop Patterns

Groups decompose a complex shape, such as a starflower, into inner loops for petals and outer loops for arrangement. Program step-by-step, test on screen, and adjust angles. Present final patterns to the class.

Explain the relationship between the number of sides and the angle of a turn in geometric shapes.

Facilitation TipDuring Small Groups: Nested Loop Patterns, ask groups to trace the turtle’s path with their fingers to visualize how each loop layer builds the design.

What to look forShow students a program that draws a simple repeating pattern (e.g., a row of circles). Ask: 'How could we change this code to make the circles form a spiral instead? What new commands or loop structures might we need?'

UnderstandApplyAnalyzeCreateSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 03

Peer Teaching35 min · Whole Class

Whole Class: Shape Decomposition Challenge

Display a complex pattern; class brainstorms decomposition into loops. Volunteers code sections on the board or projector. Everyone predicts and votes on results before running the program.

Design a program using nested loops to create a pattern made of patterns.

Facilitation TipDuring Whole Class: Shape Decomposition Challenge, display student solutions side by side to compare different decomposition strategies and discuss efficiency.

What to look forGive students a challenge: 'Design a program using nested loops to draw a 3x3 grid of squares.' Ask them to write down the main loop structure and the code for drawing a single square.

UnderstandApplyAnalyzeCreateSelf-ManagementRelationship Skills
Generate Complete Lesson

Activity 04

Peer Teaching25 min · Individual

Individual: Personal Pattern Creator

Students design and code an original pattern using at least two nested loops. Incorporate colours and sizes. Save and reflect on decomposition choices in a log.

Analyze how to break a complex pattern into smaller, repeatable steps.

Facilitation TipDuring Individual: Personal Pattern Creator, set a five-minute timer for students to share their code snippets with a partner before finalizing their design.

What to look forPresent students with a visual of a simple compound shape (e.g., a square with a triangle on top). Ask them to write down the sequence of commands they would give a sprite to draw it, identifying any loops or repeated steps.

UnderstandApplyAnalyzeCreateSelf-ManagementRelationship Skills
Generate Complete Lesson

A few notes on teaching this unit

Start by modeling how to decompose a simple shape, such as a house made of a square and a triangle, and write the code step by step. Avoid giving students pre-made solutions; instead, guide them to test and adjust angles until the shape closes perfectly. Research shows that students learn best when they experience the frustration of debugging and then celebrate the moment their code works as intended.

Successful learning looks like students breaking down compound shapes into simple steps, using loops intentionally to repeat actions, and debugging their own programs to achieve the intended visual result. You will see evidence of mathematical reasoning in their angle choices and programming logic in their loop structures.


Watch Out for These Misconceptions

  • During Pair Programming: Polygon Builder, watch for students assuming all turn angles are 90 degrees. Redirect by asking them to calculate the angle for a hexagon (360 ÷ 6) and test it in their code.

    Use the Polygon Builder activity to have students calculate and test angles for different polygons, then ask them to explain why a hexagon requires a 60-degree turn rather than a 90-degree turn.

  • During Small Groups: Nested Loop Patterns, watch for students thinking inner loops repeat endlessly without structure. Redirect by having them trace the turtle’s path and identify where each loop ends.

    Have groups physically trace the turtle’s movement on paper to see how the inner loop completes before the outer loop moves to the next position, clarifying the relationship between loops.

  • During Whole Class: Shape Decomposition Challenge, watch for students believing complex shapes need unique code for each part. Redirect by asking them to identify repeated steps in their decomposition process.

    Ask students to present how they broke down a compound shape into simple polygons and highlight any repeated patterns or loops they used in their solution.


Methods used in this brief