study material

MATERIAL: Programming on paper

Four tasks, done with a notebook and a pencil. Your notebook is the computer and you are the processor. Each task has a worksheet that teaches one idea, a question bank to practise it, and an answer key with the reasoning.

how to use it

  1. Read the Worksheet first. It is built like a game: one golden rule that holds throughout, and a series of levels that each add one idea.
  2. Open the Questions and answer every one in your notebook. Graph paper is best.
  3. Only then open the Answers and check your work, line by line, with the reasoning given.

the tasks

Four tasks, in order

Each task builds on the one before it, so take them in order.

TASK 1

Equations vs Assignments

Same =, different meaning

In maths, = states a fact: the two sides are equal. In computing, it gives an instruction: compute the right side, then store the result into the name on the left. Learn to read = as becomes, decide which lines are allowed, and rewrite maths-style lines into computing style.

TASK 2

Variables and Arithmetic

Trace the values

Read tiny programs and work out, on paper, what value each variable holds after every line. A name holds a value, a new value replaces the old one, and whatever the name held before is thrown away. Multiple choice, fill in the blanks and full traces.

TASK 3

The Print Statement

Every space counts

print shows exactly what you wrote between the quotes, nothing more and nothing less. Predict the output exactly, one letter per graph-paper cell with a dot for every space, and write print statements that produce a required output exactly.

TASK 4

SMS Templates

Find what varies

Every SMS in your phone was printed by a program. The words that are the same for every customer live inside quotes; the pieces that change are variables. Read real-looking bank, bus and recharge messages, find what varies, name it well, and write the print statement that generated it.