Students keep many values in one list and take one out by its place, counted from 0.
Load these into Waypoints Prepare: choose Load URL and paste the copied address, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.
Predict and Run 7 min · Investigate 10 min · Modify 8 min · Mix it up 3 min · Make 9 min · Lunch menu 3 min
A list (MakeCode calls it an array, in Advanced › Arrays) holds many values in order under one name. Each item has a place (an index), counted from 0: in Yes, No, Maybe, Yes is at place 0. So a list of 3 has places 0, 1 and 2, and the last place is one less than the number of items. get value at takes out the item at a place. Picking at random is next lesson.
On the slides at these points. Students can do the whole lesson on their own; these are for the room. In the deck, the Run, Modify and Make slides have the live playground in them (the tutorial link is the backup), and the notes above are in each slide's speaker notes.
Five students stand in a row holding cards 0 to 4. The class calls a place; that student steps forward.
Ask for place 5. Nobody steps forward: five items stop at place 4.
Swap mood choosers with the next pair. Press A until it goes round.
Counting places from 0. Ask them to point at each item and count aloud from zero.
| What you will see | A question to ask | The fix |
|---|---|---|
| The list block has only one or two places. | Where is the + on the list block? | Click + on the list block to add places. |
| The chooser shows nothing after the third press. | What is choice after three presses, and is there a place with that number? | There is no place 3. When choice reaches 3, set it back to 0. |
| A number shows instead of the word. | Is it show string or show number? | Words need show string, from Basic. |
One possible solution for each task. Other correct programs are fine.

let answers = ["Yes", "No", "Maybe", "Later"]
input.onButtonPressed(Button.A, function () {
basic.showString(answers[1])
})
input.onButtonPressed(Button.B, function () {
basic.showString(answers[3])
})

let answers = ["Yes", "No", "Maybe", "Later"]
input.onButtonPressed(Button.A, function () {
basic.showString(answers[1])
})
input.onButtonPressed(Button.B, function () {
basic.showString(answers[3])
})
input.onButtonPressed(Button.AB, function () {
basic.showString(answers[0])
})

let moods = ["Happy", "Tired", "Hungry"]
let choice = 0
input.onButtonPressed(Button.A, function () {
choice += 1
if (choice == 3) {
choice = 0
}
basic.showString(moods[choice])
})
Open task: any program that does what the step asks.
Stretch: Make B step backwards through the moods, going round to the last one after the first.
Support: Give students the A event with change and show already in, and ask them only to add the if that goes back to 0.
A list has Red, Green, Blue. What is at place 2, and what is at place 3?
Blue is at place 2. There is no place 3: three items use places 0, 1 and 2.
Next lesson: pick an item at random, however long the list is. Class idea: a list of the week's homework, one item per day.