GRADE 7 · COMPUTING · UNIT 2 · LESSON 2.4
Decomposing problems: Creating a smart solution
The micro:bit Python environment
Read a little. Try the workbook. Check your answers. Choose one section below to get started.
LET’S TRACE, REASON AND TEST
The micro:bit Python environment
The micro:bit Python Editor runs the micro:bit implementation of MicroPython. Import the modules your code uses, preserve exact case and indentation, and distinguish the saved source from the program transferred to a device. MicroPython also supports platforms other than the micro:bit.
- Connect a micro:bit, load a source program and transfer it to the device.
- Use the micro:bit MicroPython display API to alter a text-and-image output sequence.

Explore the clues
Tap one card to find out more.
Understand the idea
The micro:bit Python Editor runs the micro:bit implementation of MicroPython. Import the modules your code uses, preserve exact case and indentation, and distinguish the saved source from the program transferred to a device. MicroPython also supports platforms other than the micro:bit.
Concept to practise: The micro:bit Python environment.
Work through an example
After from microbit import *, display.scroll("Ready") scrolls a string and display.show(Image.HAPPY) selects an image. Image and HAPPY have specific case. A .py file contains source; device transfer prepares a program the board can execute.
Try before your workbook
What is the role of from microbit import * in these introductory examples? Why does saving source alone not prove a physical program ran?
Check my readiness thinking
The import makes the introductory micro:bit names available. Saving records the source, whereas running or transferring and observing the program provides separate execution evidence. Do not claim a hardware result without that test.
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.
Use the separate MicroPython editor
Use https://python.microbit.org for this lesson. It runs the micro:bit implementation of MicroPython. MicroPython also supports other hardware platforms. MakeCode Python uses a different API, so keep the two environments distinct.
Read a three-line MicroPython program
FIRSTMICROPYTHON_PAXA.PY
from microbit import *
display.scroll("Ready")
display.show(Image.HEART)Distinguish source, transfer and execution
| File / action | Purpose |
|---|---|
| Save a .py script | Keep readable source for editing. |
| Save a compatible .hex program | Keep an editor-generated transfer copy. |
| Send / flash | Transfer the current program to the board. |
| Stage | Action |
|---|---|
| SOURCE | Save the editable .py script. |
| EDITOR / TRANSFER | Prepare and send the HEX program. |
| PHYSICAL BOARD | Runs MicroPython and the program. |
Open, connect, send and save
- Open FirstMicroPython_Paxa.py
- Connect the board with a USB data cable
- Choose Send to micro:bit and follow the connection steps
- Observe the text, then the image on the physical board
- Save the source and transfer copy with clear revision names
Change one feature, then test again
| Revision | Text | Image | Expected sequence |
|---|---|---|---|
| Original | Ready | Image.HEART | Ready, then heart |
| Text change | Maya | Image.HEART | Maya, then heart |
| Image change | Maya | Image.HAPPY | Maya, then happy face |

Try one step with Paxa!
Use the API for the chosen editor. Label paper traces, simulator runs and physical tests accurately; ask a grown-up before connecting equipment. Save personal responses before leaving.
Our Unit 2 learning path
- Lesson 2.1: All about software
- Lesson 2.2: Introducing the micro:bit
- Lesson 2.3: Using Python with the micro:bit
- Lesson 2.4: The micro:bit Python environment
- Lesson 2.5: Correcting errors using a flowchart
- Lesson 2.6: Using sensors in programming
- Lesson 2.7: Flowcharts for algorithm planning
- Lesson 2.8: Algorithmic solutions and data types
- Lesson 2.9: Planning a smart solution
- Lesson 2.10: Effective testing
- Lesson 2.11: Evaluating a program
- Lesson 2.12: Testing accelerometer gestures
- Lesson 2.13: Protecting a museum crown
- Lesson 2.14: Final project
- Lesson 2.15: Evaluation
- Lesson 2.16: 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: Which editor is used in this lesson? the micro:bit Python editor
- Question 2: Which statement about MicroPython is accurate? it supports several hardware platforms
Worksheet 2
- Question 3: Which call scrolls the starter’s text? display.scroll("Ready")
- Question 4: Which call displays its heart image? display.show(Image.HEART)
- Question 5: What is the intended order when this program starts? Ready text, then a heart
Worksheet 3
- Question 6: Does saving source alone prove it ran on a physical board? No; transfer and observation are separate evidence.
Worksheet 4
This page introduces the activity. There are no marked responses on this sheet.
Worksheet 5
- Question 7: What should stay the same in the text-change revision? the heart image
- Question 8: What should the final image-change revision scroll? Maya
- Question 9: Why test after each isolated change? to connect any changed behaviour with that revision
Worksheet 6
- Question 10: Record the editor, board version, connection method and filenames. For each of the three revisions, give the expected text/image sequence, actual physical output, pass/fail and any repair/retest. Confirm that the current revision was sent before observing it. Distinguish any simulator trial from the required board check. Require connection using USB data cable, opening original source, sending/flashing original and observing Ready then Heart; text-only change saved and sent again, observing Maya then Heart; image-only change saved and sent again, observing Maya then Happy (equivalent learner-chosen distinct text/image acceptable if changes isolated and documented). Three saved .py versions and editor-generated transfer copies or identified direct-transfer records, actual board observations and retests. Current Python editor offers a simulator, but simulator-only evidence does not satisfy this component’s physical-device assessment. If no hardware, mark board tests pending; never invent successful flashing or device output. Teacher verifies board model and used connection. No new input/button handler is required for this startup sequence. Grown-up review; personal evidence is required.
Worksheet 7
- Question 11: Explain the role of the import line, display.scroll and display.show(Image...). Describe how the text and image revisions differ. Explain why this program belongs in the MicroPython editor, how a .py source differs from the transfer HEX, and what evidence would show that a corrected revision reached the physical board. Import provides the microbit module’s public names used here; it is not a compulsory identical first line for every Python program and does not load every possible module. display.scroll handles text and completes by default before display.show presents the image; Image member case exact. Text revision changes only quoted text; image revision keeps new text and changes HEART to HAPPY or another supported member. MicroPython display/Image APIs differ from MakeCode basic/IconNames APIs; MicroPython exists on multiple hardware platforms. .py is readable source; editor-generated compatible HEX packages the runtime/program for transfer. Evidence: identified revision, completed transfer and observed expected board output/retest, separately labelled simulator results. Renaming an extension or opening a file is insufficient. No fabricated physical test claims or numeric scoring. Grown-up review; personal evidence is required.
Curriculum & workbook reference
- Cambridge Lower Secondary Computing 7 Student’s Book — pages 55–57
- PaxaKids Grade 7 Computing Lesson 2.4: The micro:bit Python environment — pages 1–7
Computing for your homeschool day
Explore The micro:bit Python environment 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.
