A computer is fast, tireless and exact — and completely without judgement. It does precisely what it is told, in the order it is told, and not one thing more. A program is simply the list of instructions you give it: a recipe. Cook the steps in order, and you get the dish. Swap two steps, or leave one out, and you get something else — the computer will not quietly fix it for you, because it doesn't know what you meant. It only knows what you wrote.
To write instructions a computer can follow, you use a programming language. There are many, but the one you'll learn here is called Python — chosen because its lines read almost like plain English, which makes it gentle to start with. Throughout this lesson, when you meet a piece of code, do one thing first: read it like a recipe, slowly, one line at a time, asking "what does this step do?" That habit alone will carry you a long way.
A computer does exactly what you write, in order, and nothing more. It never guesses your meaning. Most "bugs" — mistakes in a program — are simply the gap between what you meant and what you actually told it to do.
Python is one of the most widely used languages on Earth. It runs scientific research, films' special effects, and parts of websites you use every day. It was even used to help process the first-ever photograph of a black hole, in 2019 — the same language a beginner writes their first line in.
Before you read any code, watch this short film once. Listen for one idea you've just met — that a program is a precise list of steps the computer follows exactly — and notice how a small change to the steps changes what comes out.
The first thing most people ever write in Python makes the computer show a message on the screen. The instruction for that is print. You give it some words to show, in round brackets, with quote marks around them. Read it like a recipe: print — followed by what to print, in brackets.
print("Hello, Florence!")
Those words inside the quote marks have a name. A piece of text in a program is called a string, because it is a row of characters strung together. You can print as many lines as you like — each print shows its own line, in order, from top to bottom:
print("Good morning.") print("It is Tuesday.")
Whenever you meet a line of code, say it out loud as a step: "print the words Hello, Florence". Naming what each step does, in order, is exactly how a programmer reads a program — and exactly how the computer runs it.
Often you want the computer to remember something — a name, a score, a price — so you can use it later. For that you use a variable: a named box you put a value into. You make one with an = sign — but careful, in programming the = doesn't mean "equals", it means "put this value into this box".
name = "Florence" age = 14 print(name)
The value in a box can change as the program runs — that's why it's called a variable, from "vary". Put a new value in, and the old one is gone:
score = 0 score = score + 10 print(score)
A variable name can be almost anything you like, but good programmers choose names that explain themselves — like player_score rather than x. Code is read far more often than it is written, so a clear name is a gift to whoever reads it next — which is usually your future self.
A program gets far more interesting when it can ask the person a question and use their answer. The instruction for that is input. It shows a prompt, waits for the person to type something and press Enter, and hands back whatever they typed — so you usually put the answer straight into a variable.
name = input("What is your name? ") print("Hello, " + name)
Now an important catch. There are different kinds of value. Text is a string (often shortened to str); a whole number is an int (short for "integer", a whole number). Here is the catch: whatever the person types into input always comes back as a string, even if they typed digits. So "14" the string is not the same as 14 the number — you can't do sums with it until you convert it, using int( ):
age = input("How old are you? ") age = int(age) print("Next year you will be", age + 1)
If it has quote marks, it's a string (text). If it's a bare whole number with no quotes, it's an int. You can do arithmetic with ints. You can join strings with +. Mixing them up is one of the most common beginner errors — and now you know to watch for it.
So far the recipe runs straight through, every line, every time. But real programs make decisions. The if statement lets a program choose: if some condition is true, do these steps; otherwise (else), do those. Read it like a recipe with a fork in it.
age = 14 if age >= 13: print("You are a teenager.") else: print("Not a teenager yet.")
Two things to notice. The condition ends with a colon (:), and the lines that belong to it are pushed in from the left — that gap is called indentation, and in Python it isn't just tidy, it's how the computer knows which steps belong to the if. And the sign >= means "greater than or equal to"; a single = would be wrong here, because that means "put into a box". To compare two values for being equal, you use a double ==.
Most programming languages mark out blocks of code with curly brackets { }. Python is unusual: it uses the indentation — the spaces at the start of a line — instead. That choice was deliberate, to force code to look as tidy as it behaves. It divides programmers to this day.
Computers are wonderful at doing the same thing over and over without getting bored. Rather than copy a line five times, you write it once inside a for loop and tell Python how many times to run it. Read it like a recipe step that says "repeat this".
for i in range(3): print("Hip hip!")
Because i holds the turn number each time round, you can even use it inside the loop:
for i in range(3): print("Count:", i)
Almost all programs are built from two ideas you've now met: if (choose between paths) and for (repeat a step). With printing, variables, input, those two — and patience — you can already write a surprising amount.
You've just met the for loop on paper. This short film shows why repeating a step is so powerful — and how a loop saves a programmer from writing the same line a thousand times. Watch for the moment a single instruction stands in for many.
Here is a tiny program. Press Run next line to be the computer — watch the highlighted line run, see the variable boxes fill, and the screen fill in. This is exactly how a program thinks: one line, in order, every time.
The loop runs its inside line three times before moving on — watch the score climb 0, 10, 20, 30. This is what "reading code like a recipe" feels like from the computer's side.
Fresh one. What does this print?
y = 10
y = y + 4
print(y)
Fresh one. How many lines does this print?
for i in range(2):
print("Hi")
Imagine explaining it to a friend who has never written code. Use a picture if it helps — a box, a label, a shelf. Try to get across two things: that a variable holds a value you give it, and that the value can change as the program runs. Three or four sentences is plenty. Try to use, in your own way, the words variable, value and = (and what it really means).
strong The "labelled box" picture is exactly the right one, and you reached for it on your own — that's the image real programmers carry in their heads. You also caught the part most people miss: that the value can change while the program runs, which is the whole reason it's called a variable.
try this One sentence calls the = sign "equals", out of habit. Worth a small fix: in code it isn't "equals", it's "put this value into the box". Naming that difference shows you've understood something a lot of beginners trip over.
to add A tiny example would seal it — one line like score = 0, then a sentence on what that line actually does. Showing the idea in action turns an explanation into a demonstration.
Sit down with Dad for any of these. They show where code came from and what it can do. Heavier titles flagged for a chat first.
Two short films to watch alongside today's lesson — each shows you something the words and pictures can't.
You learned that a program is a recipe a computer follows exactly, in order. You met print to show things, variables to remember them, input to ask the person, and the catch that input always comes back as a string. You saw if make a choice and for repeat a step. That's the heart of programming — everything else builds on these. Florence, this is computing.
The first "bug" in a computer was a real insect. In 1947, engineers found a moth trapped in a relay of an early machine, taped it into the logbook, and wrote "first actual case of bug being found". The word "bug" for a fault had been used before — but that moth is why we still say a program has bugs.