GRADE 7 · COMPUTING · UNIT 6 · LESSON 6.7
Sequencing and pattern recognition: Getting the message across
Sequences and lights
Read a little. Try the workbook. Check your answers. Choose one section below to get started.
LET’S TRACE, REASON AND TEST
Sequences and lights
A micro:bit image has five rows of five brightness digits. Read top to bottom and left to right. Zero is off, nine is maximum and 1–8 are intermediate settings; these are not binary digits.
- Map each cell of a five-by-five grid to an LED in a custom image.
- Encode an LED pattern using five rows of brightness values.

Explore the clues
Tap one card to find out more.
Understand the idea
A micro:bit image has five rows of five brightness digits. Read top to bottom and left to right. Zero is off, nine is maximum and 1–8 are intermediate settings; these are not binary digits.
Concept to practise: Sequences and lights.
Work through an example
The centre-only image is 00000:00000:00900:00000:00000. Moving that light to the top-left means using 90000 as row one and making the former centre row all zero. Keep every row exactly five digits.
Try before your workbook
Which row and digit must contain 9 for bottom-right only? Why is checking only the lit cells insufficient when repairing a pattern?
Check my readiness thinking
Use the fifth digit of the fifth row. Every other position must be zero. An unwanted extra light can make the pattern wrong, so compare all 25 positions and preserve row order as well as the intended lit cells.
Your original programs and learning models
These original PaxaKids program and data models support your workbook. Some examples deliberately contain faults to investigate. Follow their headings and preserve exact code case, punctuation and order. Traces and supplied records are not claims of physical testing.
Control individual LEDs with a grid
The allowed integer settings are 0–9: 0 is off and 9 is maximum. Settings 1–8 are intermediate brightness levels. These digits are not binary encoding.
Map a row string to its position
A centre-only image has rows 00000, 00000, 00900, 00000, 00000. For top-left only, move the 9 to the first digit of the first row and turn the previous centre digit off.
Each five-by-five table gives exact LED brightness digits: 0 is off; 9 is maximum. Rows run top to bottom and columns left to right.
| Row / column | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 0 | 0 | 0 | 0 | 0 |
| 2 | 0 | 0 | 0 | 0 | 0 |
| 3 | 0 | 0 | 9 | 0 | 0 |
| 4 | 0 | 0 | 0 | 0 | 0 |
| 5 | 0 | 0 | 0 | 0 | 0 |
| Row / column | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 9 | 0 | 0 | 0 | 0 |
| 2 | 0 | 0 | 0 | 0 | 0 |
| 3 | 0 | 0 | 0 | 0 | 0 |
| 4 | 0 | 0 | 0 | 0 | 0 |
| 5 | 0 | 0 | 0 | 0 | 0 |
Read a complete custom-image program
Original program model
from microbit import *
display.show(Image(
"00000:"
"00000:"
"00900:"
"00000:"
"00000"))Identify the three individual-LED targets
Each five-by-five table gives exact LED brightness digits: 0 is off; 9 is maximum. Rows run top to bottom and columns left to right.
| Row / column | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 0 | 0 | 0 | 0 | 0 |
| 2 | 0 | 0 | 0 | 0 | 0 |
| 3 | 0 | 0 | 0 | 0 | 0 |
| 4 | 0 | 0 | 0 | 0 | 0 |
| 5 | 0 | 0 | 0 | 0 | 9 |
| Row / column | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 0 | 0 | 0 | 0 | 0 |
| 2 | 0 | 0 | 0 | 9 | 0 |
| 3 | 0 | 0 | 0 | 0 | 0 |
| 4 | 0 | 0 | 0 | 0 | 0 |
| 5 | 0 | 0 | 0 | 0 | 0 |
| Row / column | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 0 | 0 | 0 | 0 | 0 |
| 2 | 0 | 0 | 0 | 0 | 0 |
| 3 | 9 | 0 | 0 | 0 | 0 |
| 4 | 0 | 0 | 0 | 0 | 0 |
| 5 | 0 | 0 | 0 | 0 | 0 |
Compare the faulty source with the plus target
Each five-by-five table gives exact LED brightness digits: 0 is off; 9 is maximum. Rows run top to bottom and columns left to right.
| Row / column | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 0 | 0 | 9 | 0 | 0 |
| 2 | 0 | 0 | 9 | 0 | 0 |
| 3 | 9 | 9 | 9 | 9 | 9 |
| 4 | 0 | 0 | 9 | 0 | 0 |
| 5 | 0 | 0 | 9 | 0 | 0 |
| Row / column | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 0 | 0 | 9 | 0 | 0 |
| 2 | 0 | 0 | 9 | 0 | 0 |
| 3 | 9 | 9 | 9 | 9 | 9 |
| 4 | 0 | 0 | 9 | 0 | 0 |
| 5 | 0 | 0 | 9 | 0 | 0 |
ORIGINAL FAULTY PLUS PROGRAM
from microbit import *
display.show(Image(
"00900:"
"00000:"
"99099:"
"00900:"
"00900"))Encode the three later target patterns
Each five-by-five table gives exact LED brightness digits: 0 is off; 9 is maximum. Rows run top to bottom and columns left to right.
| Row / column | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 9 | 0 | 0 | 0 | 9 |
| 2 | 9 | 0 | 0 | 0 | 9 |
| 3 | 9 | 0 | 0 | 0 | 9 |
| 4 | 9 | 0 | 0 | 0 | 9 |
| 5 | 9 | 0 | 0 | 0 | 9 |
| Row / column | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 9 | 0 | 0 | 0 | 9 |
| 2 | 9 | 9 | 0 | 0 | 9 |
| 3 | 9 | 0 | 9 | 0 | 9 |
| 4 | 9 | 0 | 0 | 9 | 9 |
| 5 | 9 | 0 | 0 | 0 | 9 |
| Row / column | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| 1 | 9 | 9 | 9 | 9 | 9 |
| 2 | 9 | 9 | 9 | 9 | 9 |
| 3 | 0 | 0 | 9 | 0 | 0 |
| 4 | 0 | 0 | 0 | 0 | 0 |
| 5 | 0 | 0 | 0 | 0 | 0 |
Practice files for this lesson
Save a copy of these original PaxaKids learner files before editing in suitable software. Some code and datasets deliberately need completion or repair. Downloading a file does not run it. Use invented data; record actual tests separately from predictions. Native software practice files are not print-optimised; use the student PDF for printing.

Try one step with Paxa!
Use supplied fictional records. Do not disclose personal details, upload private photos or bypass browser warnings to complete an activity. Save personal responses before leaving.
Our Unit 6 learning path
- Lesson 6.1: Prototyping
- Lesson 6.2: Pattern recognition
- Lesson 6.3: Patterns between text-based programming languages
- Lesson 6.4: Boolean selection and sub-routines
- Lesson 6.5: Project plans and test plans
- Lesson 6.6: Identifying errors and debugging
- Lesson 6.7: Sequences and lights
- Lesson 6.8: Creating a moving sequence of lights
- Lesson 6.9: Extending a light sequence
- Lesson 6.10: Light brightness
- Lesson 6.11: Loading-screen and name-sequence extensions
- Lesson 6.12: Final project: Sound-triggered visual alarm
- Lesson 6.13: Evaluation
- Lesson 6.14: What can you do?
For grown-ups: using this lesson
Your answers are checked in your browser. Open responses need grown-up review and are shown separately from the automatic score. Check your work, then use “Retry answers to practise” to revisit mistakes while keeping correct responses.
Read one explanation, discuss the model and try the readiness check before the workbook. Choose “Mark lesson finished” when ready. Optional account progress saves lesson position and completion across devices; save personal responses before leaving.
2. Fill in your workbook
Read the teaching and the complete workbook instructions. Choose, write or draw; Answer list offers larger controls. Trace code precisely and distinguish predictions from actual tests. Review designs, explanations and drawings with a grown-up.
Opening your PDF…
Swipe sideways across the worksheet on a small screen, or use “Answer list” for larger controls.
You’ve completed the checked activities.
TAKE YOUR PRACTICE OFFLINE
3. Download the student worksheet
All 8 original A4 student pages, ready for pencil-and-paper practice. Choose Review Answers to check your work on this webpage.
Student worksheet only · PDF · 8.3 MiB · No answer key included
TRY FIRST, THEN CHECK TOGETHER
Download the student worksheet →4. Answers & guidance
Finished your try? Open the guide and compare one worksheet at a time. Your own words may be different and still explain the right idea.
Shown on this webpage only. There is no answer-key download, and this guide is left out when printing the page.
Show answers for all 8 worksheets
Worksheet 1
- Question 1: How many LEDs are in the display? 25
- Question 2: Which statement is accurate? 0 is off and 9 is the maximum setting
Worksheet 2
- Question 3: Which row contains the centre LED? 3
- Question 4: Which column contains the top-left LED? 1
Worksheet 3
- Question 5: Which row string lights only the fourth LED in that row? 00090
- Question 6: What should happen to the old 9 when moving a single lit LED? change it to 0 so only the new target remains lit
Worksheet 4
- Question 7: Which row contains the bottom-right LED? 5
- Question 8: Which column contains Edit 1? 4
- Question 9: Which column contains Edit 2? 1
Worksheet 5
This page introduces the activity. There are no marked responses on this sheet.
Worksheet 6
- Question 10: How many LEDs are lit in Pattern 2? 10
- Question 11: How many LEDs are lit in Pattern 3? 13
- Question 12: How many LEDs are lit in Pattern 4? 11
Worksheet 7
- Question 13: Edit LEDlights1_Paxa.py separately for the bottom-right LED and the two specified edits on page 4. Repair Pattern1Debug_Paxa.py to match the plus target on page 5. For each version, record the required row/column or pattern, the changed source, expected and actual display, and a finding or Pending. Open, save and flash each revision when a micro:bit is available. Require four distinct results: bottom-right is row 5 column 5, with only its final row 00009; Edit 1 is row 2 column 4, row string 00090; Edit 2 is row 3 column 1, row string 90000; all other rows are 00000 for individual LEDs. The plus rows are 00900,00900,99999,00900,00900. The original fault omits row2/column3 and row3/column3. Correct both to9, retaining all other cells. Save distinct revisions and record actual USB/board observations or Pending, with the method separated from source/simulator work. Use 0–9 brightness digits, not binary encoding. Grown-up review; personal evidence is required.
Worksheet 8
- Question 14: For each target on page 6, write all five row strings and save a separate program from PatternStart_Paxa.py. Identify the files in your response or attach them. Open and flash each revision when equipment is available. Record the expected versus actual display, compare all 25 positions, explain any correction/retest and identify steps still Pending. Explain how the grid-to-code pattern helped. Pattern 2: rows 90009 repeated five times, with 10 lights. Pattern 3: 90009, 99009, 90909, 90099, 90009, with 13 lights. Pattern 4: 99999, 99999, 00900, 00000, 00000, with 11 lights. Require all five rows for each pattern, matching complete source or an identified attachment, distinct saved revisions, all 25 cell checks and actual observations or Pending. Preserve quotes, separators, brackets, case and import. Explain the repeated five-by-five structure and how positions map to digits. No fabricated device evidence or numeric scores. Grown-up review; personal evidence is required.
Curriculum & workbook reference
- Cambridge Lower Secondary Computing 7 Student’s Book — pages 207–210
- PaxaKids Grade 7 Computing Lesson 6.7: Sequences and lights — pages 1–8
Computing for your homeschool day
Explore Sequences and lights with this free Grade 7 Computing lesson. Read one idea together, try the fillable workbook and return to review at your own pace. Download the same student worksheet PDF for pencil-and-paper practice.
Fit learning around your family’s day. There is no timer and no sign-up is needed to use the lesson. An optional account saves your lesson position and completion across devices. Workbook responses and drawings stay in this tab; save a copy of your responses before leaving.
Understand your results
Your answers are checked in your browser. Open responses need grown-up review and are shown separately from the automatic score. Check your work, then use “Retry answers to practise” to revisit mistakes while keeping correct responses.
Choose Review Answers after trying the activity. The guide stays on the webpage; the worksheet download contains only the student pages.
For programme background, visit the Cambridge Lower Secondary Computing overview. PaxaKids provides independent original companion practice.
The book pages identify the related teaching topic. The explanations, characters, programs and exercises here are original PaxaKids companion practice. Practical tasks require the appropriate editor and, where applicable, suitable equipment. A design or paper trace is not a verified hardware result. Only completed, reviewed lessons are listed.
Explore the Cambridge Lower Secondary Computing curriculum for programme background. PaxaKids is an independent learning resource.
