Challenge: Debug the Broken Program
Programs & Judgement · challenge · find the bug in a broken program and fix it

Kavi Hunts the Bug
Kavi's little tea program would not work — the cup came out empty and cold every time. "A program that does the wrong thing has a bug in it," said Kavi, "and a good coder does not panic — a good coder hunts it." Kavi read the steps one line at a time, in order: boil the water … good … put the tea bag in … good … pour cold water on the floor — there! One line was doing the wrong thing. Kavi changed just that line to pour the hot water into the cup, pressed ▶ Run again, and out came a warm cup of tea. "Find the one wrong line, fix it, and run it again to check," Kavi hooted. "That is how you debug."
What your child will learn
A peek inside
Try this at home: A mistake in a program that makes it do the wrong thing 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 6 · S6 on KAVI Academy — a secular, whole-child learning platform for ages 5–12.
