GRADE 7 · COMPUTING · UNIT 6 · LESSON 6.3
Sequencing and pattern recognition: Getting the message across
Patterns between text-based programming languages
Read a little. Try the workbook. Check your answers. Choose one section below to get started.
LET’S TRACE, REASON AND TEST
Patterns between text-based programming languages
Desktop Python and micro:bit MicroPython share expression and sequence patterns, but their output APIs differ. Assignment binds a value to a name; it is not a declaration that permanently fixes that name to an integer.
- Compare output, delay and calculation patterns in Python and micro:bit MicroPython.
- Predict the output of a variable-based calculation before running it.

Explore the clues
Tap one card to find out more.
Understand the idea
Desktop Python and micro:bit MicroPython share expression and sequence patterns, but their output APIs differ. Assignment binds a value to a name; it is not a declaration that permanently fixes that name to an integer.
Concept to practise: Patterns between text-based programming languages.
Work through an example
A desktop program can print a calculated number. A micro:bit version may use display.scroll(str(result)). Conversion supplies text for scrolling, and scrolling takes time in addition to an explicit sleep call.
Try before your workbook
Three outputs are 4, 8 and 12, with sleep(500) after the first two. Is the start-to-start interval necessarily exactly half a second on a scrolling display?
Check my readiness thinking
No. Each explicit wait requests half a second, but displaying or scrolling also takes time. Predict the values separately from the timing, then record the observed behaviour and the limits of your measurement.
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.
Transfer a useful programming pattern
Assignment: number = 2 assigns an integer value to a name. It is not a separate declaration saying that this name must always hold an integer.
Trace assignment, calculation and output
- Start
- number = 2
- total = number * 10
- Output total
- Stop
Compare two complete calculation programs
DESKTOP PYTHON
number = 2
total = number * 10
print(total)MICRO:BIT MICROPYTHON
from microbit import *
number = 2
total = number * 10
display.scroll(str(total))Compare waits without mixing time units
DESKTOP PYTHON
import time
print(4)
time.sleep(0.5)
print(8)
time.sleep(0.5)
print(12)MICRO:BIT MICROPYTHON
from microbit import *
display.scroll("4")
sleep(500)
display.scroll("8")
sleep(500)
display.scroll("12")Modify the operation and keep the pattern
| Symbol | Meaning | Example with number = 8 |
|---|---|---|
| + | addition | total = number + 3 |
| - | subtraction | total = number - 3 |
| * | multiplication | total = number * 3 |
| / | division | total = number / 3 |
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 7 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.2 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 7 worksheets
Worksheet 1
- Question 1: What does number = 2 do? assigns the integer value 2 to number
- Question 2: Which is a string literal? "Ready"
Worksheet 2
- Question 3: What value is output with number = 2? 20
- Question 4: If only number changes to 5, what value is output? 50
Worksheet 3
- Question 5: Which lines have the same role in both programs? number = 2 and total = number * 10
- Question 6: What does * mean in number * 10? multiply
Worksheet 4
- Question 7: How many milliseconds correspond to time.sleep(0.5)? 500
- Question 8: Which statement is accurate? time.sleep uses seconds here; microbit sleep uses milliseconds
Worksheet 5
- Question 9: For this page’s addition example, what is total? 11
- Question 10: For this page’s subtraction example, what is total? 5
Worksheet 6
- Question 11: Predict before running. Test number * 10 for number = 5, 3, 6 and 7. Then keep number = 5 and separately test + 10, - 10, * 10 and / 10. For every row, give the expected value, actual value and evidence method, then a finding or Pending. Identify the saved revision and physical flash/board steps completed or still Pending. Eight cases in source order: M5=50,M3=30,M6=60,M7=70; number5 +10=15,-10=-5,*10=50,/10=0.5. Multiplication case appears in both sets and is retained. Expected values computed before execution. Actuals based on identified real method, not prefilled; desktop execution, API stubs, editor simulator and physical board distinguished. Open original equivalent, connect/flash when available; real board outcomes or Pending. Operator changes preserved in source revision, division is not integer truncation. No fabricated tests. Grown-up review; personal evidence is required.
Worksheet 7
- Question 12: Compare the calculation and output patterns in the flowchart, desktop Python and micro:bit MicroPython. Explain the role of assignment, the two meanings of *, and the delay-unit conversion. Identify your actual saved operator changes and test findings, including division. Explain to a partner how recognising the repeated structure helped you make and check changes. Record the discussion, or mark it Pending. Accurate cross-representation sequence: assign number, calculate total, output total. Common expression/assignment pattern and differing print versus display.scroll/str device output; star multiplication versus wildcard public import. Assignment is not fixed type declaration. Halfsecond corresponds0.5desktopseconds/500microbitms, scrolling adds time. Division5/10=0.5. Source revisions and findings tied to all eight cases; real expected/actual distinction. Partner explanation of useful retained structure and modified operands/operator, discussion actual or Pending. No numeric scores. Grown-up review; personal evidence is required.
Curriculum & workbook reference
- Cambridge Lower Secondary Computing 7 Student’s Book — pages 193–195
- PaxaKids Grade 7 Computing Lesson 6.3: Patterns between text-based programming languages — pages 1–7
Computing for your homeschool day
Explore Patterns between text-based programming languages 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.
