Tech Club · Bozoma Innovation Hub
All sessions › Block 6 · Code & AI
Session 37 of 44

Loops, Decisions & Debugging

Loops, conditions, sensing, variables, bugs and a clean-up mini-game.

⌨️ Start with your 10-minute typing warm-up

By the end, you will be able to:

  • Explain the difference between a counted loop (repeat (10)) and an infinite loop (forever), using the fufu pounding analogy.
  • Use an if <> then block with a diamond-shaped sensing block such as touching [mouse-pointer]?.
  • Create a Score variable, reset it with set [Score] to (0) and change it with change [Score] by (1).
  • Follow the 3-step debugging protocol: Spot it, Trace it, Fix one thing.
  • Save a working game as Cleanup_Game_[Name].sb3.

What you need

⏱️ About 90 minutes💻 Scratch (online at scratch.mit.edu or the offline app)📖 The workbook (opens in your browser)🧊 The 3D lab on this page

No computer at home? Print the PDF and practise on paper.

Your path ·

Follow these steps in order

Tick each step when you finish it. Your ticks are saved on this device, so you can stop and come back later.

  1. Learn the ideas ⏱️ 35 min

    Read pages 1–4 of the workbook and try every small task. Type your answers straight into the boxes: they save by themselves.

    📖 Open the workbook
  2. Explore the 3D lab ⏱️ 15 min

    Play with the 3D model below. The 🎯 missions tell you exactly what to do next. When you finish every mission, this step ticks itself.

    Go to the 3D lab ↓
  3. Do the Lab Mission ⏱️ 25 min

    Page 5 is the hands-on task. Do it on a real computer, step by step. You need: Scratch (online at scratch.mit.edu or the offline app).

    📖 Open page 5
  4. Check yourself ⏱️ 10 min

    Answer the questions on page 6 without looking back, then check your answers below.

    📖 Open page 6
    Finished? Check your answers

    1. "Be the Computer" Logic Tracing Challenge: Final Score value = 25 (10 + 5 + 5 + 5 = 25).

    2. Spot the Bug Challenge: Kwesi forgot set [Score] to (0), placed under when green flag clicked at the top of his script, so the score resets every new game. Accept "set Score to 0" or "the reset block".

  5. Rate yourself and save your work ⏱️ 5 min

    Tick how confident you feel on the last page, then press 🖨 Print / Save as PDF in the workbook to keep a copy. On a shared computer, press Clear my answers when you have saved it.

🎉 Session 37 complete!

Brilliant work. Next up: Session 38: Build a Web Page.

Go to Session 38 →
3D lab

🤖 Code the Sprite

Snap together motion, loop and pen blocks, run them on an x/y stage, collect litter for points and debug step by step. Follow the 🎯 missions on the right: they tell you what to do next.

Loading 3D lab…
Drag to look around · scroll or pinch to zoom · click things

Stuck? Try this

📖 Read it again, slowly

Most problems are one missed word. Look for the Panic Button or Help box in the workbook.

🧊 The 3D lab won't load?

Refresh the page. On a very old computer it may not show 3D. The workbook still has everything you need.

💾 My answers disappeared?

Answers save on the computer you typed them on. Open the workbook on that same computer and browser.

🤝 Still stuck?

Ask your mentor, a teacher or a friend. Show them the step number you are on.