computer4kids is now ComputerLeap. Same free lessons, same team. Read why we changed our name

← All lessons · 🧑‍💻 Coding Academy

🐞

🎓

⏱ 10 min

Free

Oops! Bug Hunt

A bug is a mistake in code. Become a bug detective and fix them!

🎯 What you will learn

  • A bug is a mistake in code
  • Finding bugs is called debugging
  • Mistakes are how we learn

👋 Let’s get started!

Even the best coders make mistakes! A mistake in code is called a BUG 🐞. Finding and fixing bugs is called DEBUGGING. Grab your magnifying glass, detective! 🔍

🪜 Step by step

1. 🐞 What is a bug?

A bug is when code does something we didn’t want — like Robo walking into a wall.

2. 🔍 Find it

Go through the steps one at a time. Which step went wrong?

3. 🔧 Fix it and try again

Change the wrong step, then test again. Coders do this ALL the time. It’s normal!

🧪 Try it!

Read the code, guess what it prints, then press 👀 Show output.

Spot the bug!

🥣 Get a bowl
🥛 Pour the milk
🥄 Eat the cereal
🌾 Pour the cereal

🎨 Unplugged activity

🕵️ A grown-up gives you directions to a toy hidden in the room — with ONE mistake. Find the bug and fix the directions!

Fix the buggy recipe

🥣 Get a bowl
🌾 Pour the cereal
🥛 Pour the milk
🥄 Eat!

📖 Key words

Tap a card to flip it over!

Bug
A mistake in code 🐞
Debug
Find and fix bugs 🔧
Test
Try the code to see if it works ✅

Knowledge Check Quiz

  1. What is a bug?
  2. What is debugging?
  3. Do good coders make mistakes?
← Previous lesson
Next lesson →