Unit 1 · Computational Thinking
Testing and Debugging
Design test cases, trace results, and correct logical errors.
Recommended prerequisites
0–3 minutes
Learning Objectives
- ✓Explain the central idea of testing and debugging in clear language.
- ✓Use the key term “debugging” accurately in context.
- ✓Apply the lesson method to guided and independent examples.
- ✓Check a result or interpretation using evidence and reasoning.
3–10 minutes
Warm-up
Study these two examples: “Test zero and boundaries” and “Trace one step at a time”. What pattern, contrast, or rule do you notice?
Reveal explanation
Both examples introduce testing and debugging. A strong first observation identifies what changes, what stays consistent, and how the key idea—testing compares expected and actual behaviour across normal and edge cases.—helps explain the result.
10–23 minutes
Core Teaching
1. Build the concept
Design test cases, trace results, and correct logical errors.
Testing compares expected and actual behaviour across normal and edge cases. Start by identifying the information provided, the question or purpose, and the evidence needed before choosing a method.
2. Use a reliable method
Step 1: identify the relevant features. Step 2: apply the rule or analytical lens connected to debugging. Step 3: record the result clearly.
Do not rely on a memorized answer alone. Explain why each step is appropriate so the method can be transferred to an unfamiliar situation.
3. Check quality
Compare the result with the original information. Look for inconsistent units, unsupported claims, missing steps, ambiguous language, or an answer that does not address the question.
When more than one response is possible, judge it by the quality of its evidence and reasoning rather than by confidence alone.
4. Transfer the learning
Use testing and debugging beyond the model examples by changing the context, data, text, or constraints.
A transferable skill remains useful when surface details change. State which part of the method remains constant and which part must be adapted.
23–33 minutes
Guided Practice
1.Explain the key idea behind “Test zero and boundaries”.
Hint: Use the term “debugging” and connect it to the evidence in the example.
Answer: Test zero and boundaries. This illustrates the lesson principle: Testing compares expected and actual behaviour across normal and edge cases.
2.Compare “Test zero and boundaries” with “Trace one step at a time”. What should a learner notice?
Hint: Name one similarity and one meaningful difference.
Answer: Both belong to testing and debugging, but they demonstrate the idea in different forms. A complete comparison cites the specific feature that changes.
3.How could you verify that your response is reasonable?
Hint: Return to the original information and use a second check.
Answer: Reapply the rule or analytical lens, inspect each step, and confirm that the conclusion answers the exact question.
33–40 minutes
Independent Practice
- 1.Write a two-sentence explanation of testing and debugging using “debugging” accurately.
- 2.Create a new example that follows the same principle as “Test zero and boundaries”.
- 3.List the steps you would use to solve or analyze an unfamiliar example.
- 4.Describe one common error and explain how a careful check would reveal it.
Check independent-practice answers
- 1. A successful response defines debugging and explains the principle: Testing compares expected and actual behaviour across normal and edge cases.
- 2. Answers vary. The new example must preserve the lesson principle and include enough detail to verify it.
- 3. Identify the goal and evidence; choose the relevant rule or lens; apply it step by step; explain and check the result.
- 4. Answers vary. The error must be specific, and the proposed check must be capable of detecting it.
40–45 minutes
Lesson Check
Answer every question. A score of 80% or higher marks this lesson complete.
Lesson Summary
- •Testing compares expected and actual behaviour across normal and edge cases.
- •The term “debugging” should be connected to specific evidence or working.
- •A reliable response identifies, applies, explains, and checks.
- •The skill becomes durable when it can be transferred to an unfamiliar example.