Computing · Stage 3

Test & Debug

Thinking It Through · computational thinking — run a program, find the bug and fix it

✦ Computing📘 Stage 3 · S3⏱ ~9 min🧒 Ages 7–8★ Free to start
test a program, find the bug and fix it
Kavi the owl for Computing
📖

Kavi's Robot Goes the Wrong Way

Kavi wrote a little program so his robot would walk to the shiny star. He pressed run — but the robot turned and bumped the wall! "Oh no, something is wrong," Kavi hooted. A mistake in a program is called a bug 🐛. So Kavi did what every coder does: he tested it again and watched closely, found the one wrong step, and fixed it. He ran it once more — and this time the robot walked straight to the star! Test, find the bug, fix it — that is how we make a program work.

🎓

What your child will learn

1Test → Find the bug → Fix itWhen a program does the wrong thing, coders follow three steps, round and round until it works. Tap each step to hear it!
2Run it and watchKavi wants the robot to reach the star, which is one step to the left. But his program says: step right. Predict what happens when he tests it, then reveal.
3Which step belongs, and which is a bug?The plan is to walk the robot to the star. Some steps help; one or two are bugs — wrong steps that break the plan. Tap the right box for each one.
🔍

A peek inside

Kavi's program should move the robot UP to the star, but when he runs it the robot moves DOWN. Did the test find a problem?
testing = run it and watch what really happens; it went the wrong way

Try this at home: A mistake in a program is called a ____.

Ready to play and learn?

Start the free interactive lesson, or print the handout for screen-free play.

Part of Computing · Stage 3 · S3 on KAVI Academy — a secular, whole-child learning platform for ages 5–12.