Skip to content
Exit presentation

Programming with Blocks II

The big picture

Here are the five ideas, in the order a game needs them.

Programming with Blocks II: the five ideas
IdeaRemember
A named boxA variable is a named box. It holds one value at a time. Setting it replaces what was there.
Changing itAn add block reads the number in the box. It works out the new number. It writes that back.
WaitingAn event block names one happening. Its group runs only when that happening comes.
Nested blocksNesting puts one block inside another. The outside block decides whether, and how often, the inside runs.
Planning firstA plan puts each step after the step it needs.

Put them together. The flag is the button that starts the game. One group waits for the flag and sets score to 0. One group waits for a tap and adds 1. A check ends the round when score reaches 10.

Next comes Data & Patterns II. It starts with one switch, on or off.

Jump to lesson

This track

  1. 0 Start here
  2. 1 A box with a name on it
  3. 2 Changing what is in the box
  4. 3 Waiting for something to happen
  5. 4 One block inside another
  6. 5 Plan it before you build it
  7. 6 The big picture
  8. 7 Track quiz

Other tracks