Module 6: Practice Activities
Debugging challenges to test your detective skills. Find the bugs!
Activity 1: Spot the Bug in the Instructions Easy
Screen-Free Challenge
Each set of instructions has one bug. Find it and say whether it is a wrong step, a missing step, or a wrong order bug.
A. Making Orange Juice:
- Get a glass
- Pour the juice into the glass
- Cut the orange in half
- Squeeze the orange halves over the glass
- Drink the juice
B. Washing Your Hands:
- Turn on the water
- Put soap on your hands
- Rub your hands together for 20 seconds
- Dry your hands with a towel
C. Sending a Letter:
- Write the letter
- Put the letter in an envelope
- Put a stamp on the envelope
- Write the address on the envelope
- Put the envelope in a mailbox
- Seal the envelope
B. Missing step -- you need to rinse the soap off your hands before drying them.
C. Wrong order -- step 6 (seal the envelope) should come before step 5 (put it in the mailbox). Also, step 4 (write the address) should come before step 6 (sealing).
Activity 2: The "Yet" Challenge Easy
Screen-Free Challenge
Rewrite each sentence using the word "yet" to turn it into a growth mindset statement. Then write one thing you could do to work toward it.
- "I cannot find the bug."
- "I do not understand how loops work."
- "I cannot draw a hexagon in Scratch."
- "I am not good at coding."
2. "I do not understand loops yet." I could go back and re-read Lesson 2 from Module 5.
3. "I cannot draw a hexagon yet." I could look up how many degrees to turn (60) and try it.
4. "I am not good at coding yet." I could keep practicing one lesson at a time!
Activity 3: Build a Debugging Flowchart Medium
Screen-Free Challenge
Create a debugging flowchart for this problem: "My Scratch code does not do anything when I click the green flag."
Your flowchart should have at least 4 yes/no questions, going from the simplest check to the hardest. Start with the most common problem and work down.
Draw boxes for questions, arrows for yes and no, and action boxes for fixes.
1. Is there a "when green flag clicked" block? No → Add one. Yes ↓
2. Are all blocks snapped together? No → Connect them. Yes ↓
3. Is the correct sprite selected? No → Click the right sprite. Yes ↓
4. Is the sprite visible and on the stage? No → Add "show" and "go to x:0 y:0." Yes ↓
5. Are the numbers reasonable? No → Fix the numbers. Yes ↓
6. Ask a friend or grown-up for help!
Activity 4: Debug the Story Medium
Scratch Challenge
Build this broken code in Scratch and fix it. The cat should say "Once upon a time..." then walk forward, then say "The end!"
move (50) steps
say "The end!" for (2) seconds
say "Once upon a time..." for (3) seconds
What is wrong? The blocks are in the wrong order. The cat walks first, then says the ending, then says the beginning!
Activity 5: Debug the Triangle Medium
Scratch Challenge
This code is supposed to draw a triangle, but it draws something else. Build it and fix the bugs.
erase all
pen down
repeat (3)
move (100) steps
turn right (90) degrees
Activity 6: Break It on Purpose! Challenge
Scratch Challenge
Build a simple Scratch project that works perfectly (like a cat that walks and says something). Then introduce exactly 3 bugs into your project. Write down what the 3 bugs are on a separate piece of paper.
Now give the buggy project to a parent, sibling, or friend and challenge them to find all 3 bugs using the Debugging Detective steps!
Ideas for bugs to introduce:
- Remove the "when green flag clicked" block
- Change a number to something ridiculous (like 9999 steps)
- Swap the order of two blocks
- Add a "hide" block at the beginning
- Disconnect a block from the stack
Activity 7: Rubber Duck Debugging Challenge
Screen-Free + Scratch Challenge
Find a stuffed animal, action figure, or any small toy. This is your "rubber duck."
- Open any Scratch project you have been working on (or start a new one).
- Place your "rubber duck" next to the computer.
- Explain your entire project to the duck, block by block: "First, when the green flag is clicked, the cat moves 10 steps. Then it turns right 90 degrees..."
- As you explain, notice if anything sounds wrong or out of place.
- If you find a problem while explaining, fix it!
This sounds silly, but it really works. Professional coders use this technique every day!