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.

8 fillable worksheet pagesRead at your own pace

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.

Today’s two goals
  • 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.
Original PaxaKids illustration for Sequences and lights. Precise program text and data are supplied in the workbook models.
An original PaxaKids workbook scene. Use the supplied programs and data for precise workbook facts.

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 micro:bit display has five rows and five columns: 25 LEDs. A custom Image uses five rows of five brightness digits. Read rows from top to bottom and digits from left to right.

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

The diagrams use human row/column numbers 1–5, starting at the top left. In a five-digit row, the third digit controls the third LED from the left. The third row is the centre row.

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.

Centre only
Row / column12345
100000
200000
300900
400000
500000
Top-left only
Row / column12345
190000
200000
300000
400000
500000

Read a complete custom-image program

The original LEDlights1_Paxa.py displays the centre LED. Each quoted row contains five digits. Colons separate the rows; Python joins adjacent string literals inside the brackets. The final two closing brackets finish Image() and display.show().
Original program model
from microbit import *

display.show(Image(
    "00000:"
    "00000:"
    "00900:"
    "00000:"
    "00000"))

Identify the three individual-LED targets

Keep exactly one LED on for each separately saved program. The first target is the bottom-right LED. The other two match the positions shown in the book’s edit examples, redrawn here with explicit labels.

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.

Bottom right
Row / column12345
100000
200000
300000
400000
500009
Edit 1: R2 C4
Row / column12345
100000
200090
300000
400000
500000
Edit 2: R3 C1
Row / column12345
100000
200000
390000
400000
500000

Compare the faulty source with the plus target

Pattern1Debug_Paxa.py is an original runnable starter with two missing lit positions. Compare every digit with the target and repair the mismatches.

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.

Target: plus
Row / column12345
100900
200900
399999
400900
500900
Target row digits
Row / column12345
100900
200900
399999
400900
500900
ORIGINAL FAULTY PLUS PROGRAM
from microbit import *

display.show(Image(
    "00900:"
    "00000:"
    "99099:"
    "00900:"
    "00900"))

Encode the three later target patterns

Use separate copies of PatternStart_Paxa.py for Patterns 2, 3 and 4. It is a valid all-off starter. Match every lit and unlit position in these original native redrawings.

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.

Pattern 2
Row / column12345
190009
290009
390009
490009
590009
Pattern 3
Row / column12345
190009
299009
390909
490099
590009
Pattern 4
Row / column12345
199999
299999
300900
400000
500000

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.

Paxa the Fox

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
  1. Lesson 6.1: Prototyping
  2. Lesson 6.2: Pattern recognition
  3. Lesson 6.3: Patterns between text-based programming languages
  4. Lesson 6.4: Boolean selection and sub-routines
  5. Lesson 6.5: Project plans and test plans
  6. Lesson 6.6: Identifying errors and debugging
  7. Lesson 6.7: Sequences and lights
  8. Lesson 6.8: Creating a moving sequence of lights
  9. Lesson 6.9: Extending a light sequence
  10. Lesson 6.10: Light brightness
  11. Lesson 6.11: Loading-screen and name-sequence extensions
  12. Lesson 6.12: Final project: Sound-triggered visual alarm
  13. Lesson 6.13: Evaluation
  14. 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.

Sequences and lights8 student pages · original artwork

Opening your PDF…

Swipe sideways across the worksheet on a small screen, or use “Answer list” for larger controls.

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

Download worksheet PDF ↓

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

  1. Question 1: How many LEDs are in the display? 25
  2. Question 2: Which statement is accurate? 0 is off and 9 is the maximum setting

Worksheet 2

  1. Question 3: Which row contains the centre LED? 3
  2. Question 4: Which column contains the top-left LED? 1

Worksheet 3

  1. Question 5: Which row string lights only the fourth LED in that row? 00090
  2. 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

  1. Question 7: Which row contains the bottom-right LED? 5
  2. Question 8: Which column contains Edit 1? 4
  3. 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

  1. Question 10: How many LEDs are lit in Pattern 2? 10
  2. Question 11: How many LEDs are lit in Pattern 3? 13
  3. Question 12: How many LEDs are lit in Pattern 4? 11

Worksheet 7

  1. 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

  1. 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.
Back to my workbook ↑

Curriculum & workbook reference

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.