TechnologyFreePrintable

Debug Detective Worksheet

A free technology worksheet ready for your classroom. Open in Kuraplan to grab the print-ready PDF, customize it for your students, or generate a fresh version in seconds.

Debug Detective Worksheet worksheet preview

Debug Detective Worksheet

Worksheet illustration

🔍 Part 1: Find the Bug

Read the algorithm below (it has mistakes):

Steps to make a peanut butter & jelly sandwich (flawed):

1. Put peanut butter on one slice of bread.

2. Close sandwich.

3. Spread jelly on a slice of bread.

4. Get two slices of bread.

5. Cut sandwich in half.

1. Which step should happen first?

Step 1: Put peanut butter on one slice

Step 2: Close sandwich

Step 3: Spread jelly on a slice

Step 4: Get two slices of bread

2. Which step is clearly out of place?

Step 2: Close sandwich

Step 5: Cut sandwich in half

Step 1: Put peanut butter

Step 3: Spread jelly

3. Check all problems you notice in this algorithm:

Steps are out of order

A step to get bread is missing

Close sandwich before adding both spreads

No step telling you to wash hands or use a knife safely

✏️ Part 2: Fix & Explain

4. Rewrite the corrected algorithm in order. Use short steps (number each step):
5. Match each fix to the reason it is needed.
A. Move "Get two slices of bread" to step 1
B. Move "Spread jelly" so it comes after peanut butter
C. Move "Close sandwich" to after both spreads are added
D. Add "Wash hands and use a knife safely"
1. Ensures spreads go on bread that is ready
2. Keeps sandwich from closing too early and trapping one spread
3. Safety and cleanliness before food preparation
4. Keeps peanut butter and jelly from being placed on separate pieces incorrectly
6. Explain in 1–2 sentences: Why is it important to test the corrected algorithm after fixing it?
7. Reflection — In one word, what does "debugging" feel like to you? Why? (1 sentence)

About This Worksheet

Free in Kuraplan

Sign up free, grab the PDF, and customize it for your class.

Print-Ready

Formatted for standard paper. Clean layout, easy to read.

AI-Generated

Created with Kuraplan's AI, designed for real classroom use.

For Teachers & Parents

Use in classrooms, for homework, tutoring, or homeschool.

Need a custom version of this worksheet?

Kuraplan's AI generates custom worksheets in seconds — differentiated for every learner, aligned to your curriculum.

Generate Custom Worksheets — Free
No credit card Curriculum-aligned Under 60 seconds