Learning objective
- To debug Python code by spotting and fixing errors in spacing, syntax and loops.
Success criteria
- I can identify and describe different types of
This content is for subscribers only. Join for access today.
National curriculum
Computing
Pupils should be taught to:
- Design,
This content is for subscribers only. Join for access today.
Cross-curricular links
English
Spoken language
Pupils should
This content is for subscribers only. Join for access today.
Before the lesson
This content is for subscribers only. Join for access today.
Lesson plan
Recap and recall
Explain that the children will be talking with a partner to recall what they learnt about remixing a project in Scratch. Display the Presentation: Speak like an expert and arrange the children in pairs. Allow time for discussion using key vocabulary.
This content is for subscribers only. Join for access today.
Extended-mode explainer videos
How to extend your display to view the lesson page and preseantion mode simultaneously. Choose your operating system below to watch the video
If you need further support with extending your display,
please contact [email protected].
Extended-mode explainer video: For Mac
Extended-mode explainer video: For Windows
Adaptive teaching
Pupils needing extra support
- Could use the Knowledge organiser to help identify and name different error types (syntax, logic and loop errors) before attempting to fix them.
- Could take on the role of running the program and describing what happens on the micro:bit simulator while their partner reads the code aloud, helping them link what they see to specific lines of code.
- Could use the Debugging checklist to work through the code line by line when they are unsure where the bug is.
- Could act as the ‘checker’ once a fix is applied to confirm that the program runs without red error messages.
Pupils working at greater depth
- Should predict the program’s output before running it and justify their reasoning by referring to loop values, indentation and syntax.
- Should evaluate more than one possible cause for a bug and explain why one is the most likely based on how Python executes the code.
- Could create a short buggy Python program (for example, with a syntax, indentation or loop error) for another team to debug.
- Could support other pupils by explaining clearly how a specific fix works and why it resolves the error.
This content is for subscribers only. Join for access today.
Assessing progress and understanding
Pupils with secure understanding indicated by: identifying and describing spacing, syntax and
This content is for subscribers only. Join for access today.
Vocabulary definitions
-
.hex file
The file type that stores a program for the micro:bit.
-
debug
Finding and fixing mistakes in code to make a program work correctly.
This content is for subscribers only. Join for access today.