Grade 7 Computer Science · What a program is

Summary practice — what a program is

Ten exercises over literal execution, order, the algorithm, decomposition and choosing.

Before the first line

A machine that follows word for word, lines that see only what came before them, an algorithm that must work even when there is nothing, and a choice between correct solutions. These exercises check whether you now read code the way the computer does, not the way a person does.

The unit dealt with what happens before a line is written: how the machine reads, and how one thinks about a problem.

LessonThe central idea
1A computer executes what is written, not what you meant
2Every line sees only what is before it
3An algorithm: clear, terminating, and solving every case
4A good part stands alone, clear interface, testable
5Several correct solutions; one chooses by criterion
7 flashcards: a term or question on one side (A computer versus a person, The order of the lines, An algorithm, Edge cases, A good part of a decomposition, Choosing between correct solutions, “The computer made a mistake”) and the explanation on the other. They can be shuffled and marked as known.