Skip to content
Exit presentation

Programming Proper I

The big picture

The eight ideas, in order.

Programming Proper I — eight ideas, in order
IdeaRememberExample
Typing it outOne line, one instruction, top to bottom.Swap two lines, order changes
let and constlet refills. const refuses and names the box.seats stays 32
Four kinds of valueNumber, text, true or false, nothing.12 vs "12"
What the signs doArithmetic on numbers. + joins when the other side can be written out.163 → "163 rupees"
A fork in the lineif runs only when true. else catches the rest.60 ≥ 60 is true
Until it stopswhile checks first, then runs, then checks again.96 → 6 in 4 rounds
Once for eachfor ... of runs once per item in the list.3 stops, 3 turns
What the message saysA line number, and what could not be done there. The cause may sit above it.line 3, missing let

A machine does exactly what you typed, and nothing else. So its message tells you where it stopped.

Next comes Computational Thinking III: Functions & Debugging. One set of lines gets a name. A wrong program is checked in halves, not read from the top.

Jump to lesson

This track

  1. 0 Start here
  2. 1 The same program, typed instead of dragged
  3. 2 A box you can change, and a box you cannot
  4. 3 Four kinds of value, and why the quotes matter
  5. 4 What the signs do, and the one that does two jobs
  6. 5 A fork in the line
  7. 6 A loop that runs until something stops it
  8. 7 Once for each thing you have
  9. 8 What the message says, and what it does not
  10. 9 The big picture
  11. 10 Track quiz

Other tracks