Activity 01
Pair Swap: Logic Bug Hunt
Each student creates a short program with a conditional statement, such as scoring in a game. Partners swap code, introduce one deliberate logic error, then debug it using print statements and edge-case tests. Pairs discuss fixes and swap back to verify.
Explain a systematic approach to finding a logic error in a conditional statement.
Facilitation TipDuring Pair Swap: Logic Bug Hunt, circulate and listen for students verbalizing their hypothesis before changing code, reinforcing that debugging is thinking, not clicking.
What to look forProvide students with a short program containing a clear logic error in an 'if' statement (e.g., checking if a score is greater than 100 when it should be greater than or equal to 100). Ask them to identify the incorrect condition and rewrite it correctly.