The Foundry · Level 3

Your First Program

A program is just a list of steps. Build one that looks at a number and decides what to say.

Three small ideas

Every program, even the giant ones, is built from pieces this simple. Here are the three you need today.

A program is a list of instructions. The computer reads them in order, from the top down, and does exactly what each line says. No more, no less.
A variable holds a value. Think of a variable as a labelled box. We will use one called score that holds a number you choose.
An if/else makes a decision. It asks a yes-or-no question about your value. If the answer is yes, it does one thing. If no, it does the other.

← The Foundry · every fact here is real, kept simple. The program only ever checks your number, it never runs your words.