Skip to content
Your progress

Checking your sign-in…

Who's learning?

Each profile keeps its own read lessons, badges, streak, and practice scores on this device.

Lesson 6 of 8

The big picture

Show on a big screen

3 min

Text size

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.