Activity 01
Pair Debug Swap: Buggy Algorithms
Pairs write a simple algorithm with one intentional error, then swap with another pair to identify and fix it using print statements and trace tables. Discuss fixes as a class afterward. Circulate to prompt systematic checks.
Analyze the common types of errors encountered during program execution.
Facilitation TipDuring Pair Debug Swap, provide a clear rubric for peer feedback so students focus on explaining their debugging steps, not just the fix.
What to look forProvide students with a short Python code snippet containing a common error (e.g., a syntax error or a simple logic error). Ask them to: 1. Identify the type of error. 2. Explain the cause of the error in one sentence. 3. Write the corrected line of code.