Write Real Code
Programs & Judgement · write real code · type text-based code and run it line by line to see what it prints

Kavi Types the Real Thing
For a long time Kavi built programs by dragging coloured blocks. "But real programmers type their code," Kavi said. "They write it as text — words and symbols, one line at a time." So Kavi opened an editor and typed three lines: score = 0, then score = score + 5, then print(score). Kavi pressed Run. The computer read the lines from top to bottom, one at a time, and the screen showed 5. "It really runs!" Kavi hooted. "Each line is an instruction. A variable like score is a named box that holds a value. print shows something on the screen. And I must type it exactly — the right spelling, the right brackets, the right quotes — or it will not run." Writing real code is just this: type clear instructions, in order, and let the computer run them.
What your child will learn
A peek inside
Try this at home: Code you type as words and symbols, instead of dragging blocks, is called ____ code.
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.
