Step 1 of 10
What a program is
A list of instructions, followed exactly
A program is a list of instructions, carried out one at a time, from the top. That is the whole idea. Everything else in this lab is a way of changing which instruction comes next, or what the instructions are working on.
The machine is relentlessly literal. It does exactly what you wrote, including when what you wrote is not what you meant — and almost every hour anybody has ever spent programming was spent in that gap. It is not a sign you are bad at this. It is the job.
You will be writing Python, which is real and widely used. Everything here works unchanged in a real Python anywhere else.
Your programs act on a small world: you are outside a castle with a pile of rocks, and there is a wind. You throw. The castle either falls or it does not, and you can see which — so when your program is wrong you find out by watching a rock land in a field, rather than by reading a message about it.
One habit worth starting today: when something does not work, print things. Print the value you think you have. Half the time you will find you have something else, and that is the whole bug.
Sign in to save your progress.