Coding · Grade 7
Decompose a Larger Problem
Using a realistic field-trip organiser, learners break a large problem into a decomposition tree, describe each piece with inputs, process and outputs, use abstraction to keep only the details that matter, and generalise repeated patterns into parameterised functions. They then order the build by dependencies, connect the parts in a short main program, and decompose a new problem in a reviewed write-up.
- 4 lessons
- About 80 minutes
- Check what you learned: 8 questions
- Ways to answer: fill in the blanks, choose an answer, put code in order, trace code, highlight a text and match pairs
What learners will discover
- Break a large problem into a decomposition tree and decide when a sub-problem is small enough to solve directly.
- Describe each sub-problem by its inputs, process and output, and turn that description into a function.
- Use abstraction to keep only relevant details and generalise repeated patterns into one function with parameters.
- Order the parts of a solution by their dependencies and connect them in a main program.
Lessons
-
Decomposition trees 6 steps3 practiceabout 20 min
-
Input, process, output 6 steps4 practiceabout 20 min
-
Abstraction and patterns 6 steps4 practiceabout 20 min
-
Building and connecting the parts 4 steps3 practiceabout 18 min
-
Check what you learned 8 questions at the end
Keep exploring
Games to practice with
- Bug DetectiveA robot program almost works. Run it, spot the buggy block, and fix it.
- Sorting FactoryTurn a work order into if/else rules and watch the conveyor sort every item.
- Garden AutomationProgram a garden robot with sensor rules — then watch a whole day play out.
More 7th grade coding
- 7th Grade Coding Games4 games to play free
- 7th Grade Coding Worksheets11 printable worksheets
Guide for grown-ups
- How to start homeschooling: a step-by-step guide for familiesA guide for parents · 7 min read