Challenge: Trace the Program
Thinking It Through · programming · follow a program step by step to predict its output

Kavi Becomes the Computer
Kavi stared at a little program and asked, "What will it print?" Instead of guessing, Kavi decided to be the computer. Kavi started at the first value, then read one line at a time, doing exactly what each line said and keeping track of the number. set score = 2 · add 3 · take 1. "Two… plus three is five… take one is four," Kavi whispered. When the last line said print score, Kavi knew the answer before the computer did — 4! "Following a program step by step is called tracing," Kavi hooted, "and it never lies."
What your child will learn
A peek inside
Try this at home: Following a program one line at a time to see what it does is called ____.
Ready to play and learn?
Start the free interactive lesson, or print the handout for screen-free play.
Part of Computing · Stage 4 · S4 on KAVI Academy — a secular, whole-child learning platform for ages 5–12.
