Debugging Pseudocode: Finding Errors with Tables
Open this deck in Kuraplan
Sign in to view all 10 slides, customise, present or download.
Slide preview
First 10 of 10 slides
Debugging Pseudocode: Finding Errors with Tables
Year 7 Digital Technologies South Australian Curriculum v9.0 45-minute lesson
Learning Intention & Success Criteria
Learning Intention: Students will learn to identify and debug errors in pseudocode using systematic table methods Success Criteria: I can read pseudocode accurately I can identify logical errors in code sequences I can use debugging tables to track variable values I can suggest corrections for faulty pseudocode
What is Pseudocode?
Human-readable instructions for computer programs Uses simple English-like statements Shows the logic without specific programming language Example: 'IF temperature > 30 THEN display hot' Helps plan programs before coding
Reading Pseudocode Practice
Look at this pseudocode sequence: SET score = 0 IF player hits target THEN ADD 10 to score DISPLAY score What will happen when the player hits the target?
Common Pseudocode Errors
Logic errors: Wrong sequence of steps Variable errors: Using undefined variables Condition errors: Incorrect IF statements Loop errors: Infinite or incorrect loops Output errors: Missing or wrong display commands
Introduction to Debugging Tables
Systematic way to track variables Shows how values change step by step Helps identify where errors occur Columns: Step, Action, Variable Values Makes debugging visual and organized
Debugging Table Example
{"left":"Step 1: SET x = 5\nStep 2: SET y = 10\nStep 3: SET z = x + y\nStep 4: DISPLAY z","right":"x = 5\ny = 10\nz = 15\nOutput: 15"}
Find the Bug Challenge
Pseudocode with an error: SET lives = 3 REPEAT UNTIL lives = 0 IF player loses THEN SET lives = lives + 1 END IF END REPEAT Use a table to find the problem!
Differentiation & Extension
For struggling learners: Use visual block representations For dyslexic students: Provide color-coded pseudocode Extension activity: Create your own buggy pseudocode Advanced challenge: Debug nested IF statements Pair programming: Work together to solve problems
Lesson Summary & Next Steps
Today we learned to read pseudocode systematically We used debugging tables to track variables We identified common types of coding errors We practiced finding and fixing bugs Next lesson: Creating our own pseudocode programs