Track quiz
Show on a big screenUse the table if you get stuck.
| Idea | Remember |
|---|---|
| A named box | A variable is a named box. It holds one value at a time. Setting it replaces what was there. |
| Changing it | An add block reads the number in the box. It works out the new number. It writes that back. |
| Waiting | An event block names one happening. Its group runs only when that happening comes. |
| Nested blocks | Nesting puts one block inside another. The outside block decides whether, and how often, the inside runs. |
| Planning first | A plan puts each step after the step it needs. |
A box named lives holds 3. A block sets it to 1. Another sets it to 5. What is in the box?
A box is named mangoes and holds 400. What does the name tell the computer about mangoes?
A box holds 4. The block add 1 to score runs twice. What is in the box now?
score is 0. Repeat 4 times: add 3. What does score hold at the end?
score = score + 1 looks wrong in Maths. Why is it fine in a program?
Four groups wait. A tap happens. One group names a tap. What runs?
A game does nothing between taps. What does that tell you?
score starts at 1. A: if score < 3, repeat 3 times, add 1. B: repeat 3 times, if score < 3, add 1. Where do they finish?
A plan lists show the score before set the score to 0. Why is that a problem?
You can now keep a number and change it. You can run a group on an event. You can read one block inside another.
Next comes Data & Patterns II. It starts with one switch, on or off.
Reveal every answer to finish this lesson.