Skip to content
Crayon CS

Make it comfy

Lesson style

Quick mode shows the key picture, a summary and the practice. Good for a refresher.

Theme
Font

Both fonts are designed to be easy to read. Some readers with dyslexia prefer Lexend.

Text size
Spacing
Animations

Lesson 1 of 26 · about 10 min

Your first recipe for a computer

A program is a list of instructions the computer follows exactly, top to bottom. print() shows text on screen.

🧭 What you need first: A room full of light switches

The story

Imagine leaving a note for a house-sitter who follows instructions perfectly literally:

  1. Feed the cat.
  2. Water the plants.
  3. Lock the door.

They’ll do exactly that, in exactly that order. If you wrote “lock the door” first, they’d lock themselves out before feeding the cat. If you wrote “feed teh cat,” they’d stop and say: “I don’t know what ‘teh’ means.”

That house-sitter is a computer. A list of instructions like this is a program, and writing one is called programming. You’re about to write your first one.

Another way: a recipe

A program is like a recipe that a robot chef follows. The robot never skips a step, never improvises, and never guesses what you “meant.” Put the steps in the wrong order and you get cake batter baked before the eggs go in.

Another way: GPS directions

“Turn left, go 200 m, turn right.” Your GPS gives directions in order, and you follow them one at a time. A program is directions for the computer, and it follows them even more strictly than you do.

Play with it

Run real Python

This box runs real Python, the same language used at Google, NASA and in universities. Press ▶ Run and see what happens. Then change the words inside the quotes and run it again.

Try this: swap the order of two lines, then run it. The output changes order too, because the computer runs lines from top to bottom.

Name it

Grown-up words

  • A program is a list of instructions. Each line here is one instruction.
  • print(...) is a built-in instruction that shows whatever is inside the brackets.
  • Text inside quote marks, like "Hello!", is called a string (as in “a string of characters”). The quotes tell Python: this is text, not an instruction.
  • Python runs the lines in order. Programmers call this sequence: the first of three big ideas every program is built from. (You’ll meet the other two, choices and repetition, soon.)

And remember last lesson? Each of those letters is stored as a Unicode number in binary. When you press Run, your words become bits, the computer follows them, and the result is turned back into letters on your screen.

Build it

Write your own program

Write a program that prints exactly these three lines, in this order: Ready, Set, Go!

Challenge

Debug the robot

Bit the robot wrote this program, but it won’t run. Press ▶ Run to see the error, then fix it.

Fix Bit's program so it prints: I love pizza

Remember it

A program has two lines: print("B") then print("A"). What shows on screen?

Got it?

Finish the lesson to color it in on your map and collect its concept cards.

Did this lesson click?