Students add else if to ask more questions in a row, and see that the first true question wins, so the order of the questions sets the ranges.
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 8 min · Investigate 10 min · Modify 8 min · Mix it up 3 min · Make 8 min · Spirit level 3 min
Click the + at the bottom of an if block to add else if (another question). The micro:bit asks the questions from the top; the first true one runs and the rest are skipped. else runs only when every question above it is false. That makes ranges simple: temperature < 15, then else if temperature < 25 means 15 to 24, because anything under 15 was already caught. It also makes order matter: ask > 0 before > 500 and the second can never run. Tilt in the simulator: move the mouse over the micro:bit.
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.
The teacher reads three questions in order ("born in summer?", "in autumn?", else). Each student stands at the first sign that is true for them and stops there.
Then swap the order of two questions. Does anyone change sign? Why?
Show your comfort meter to the next pair. They drag the slider and call out the range before it shows.
Seeing that only the first true question counts. Ask them to read the questions from the top with one value and stop at the first yes.
| What you will see | A question to ask | The fix |
|---|---|---|
| One picture never appears. | Is there a value that makes its question true, and no question above it true? | Put the narrower question first (> 500 before > 0). |
| The comfort meter shows hot for 20 degrees. | Read your questions from the top with 20. Which is true first? | Check the < and >, and the order: < 15, then < 25, then else. |
| There is no else if. | Where is the + on the if block? | Click the + twice: the first adds else, the next adds else if. |
One possible solution for each task. Other correct programs are fine.

basic.forever(function () {
if (input.acceleration(Dimension.X) > 500) {
basic.showArrow(ArrowNames.East)
} else if (input.acceleration(Dimension.X) > 0) {
basic.showIcon(IconNames.SmallDiamond)
} else {
basic.showIcon(IconNames.SmallSquare)
}
})

basic.forever(function () {
if (input.acceleration(Dimension.X) > 500) {
basic.showArrow(ArrowNames.East)
} else if (input.acceleration(Dimension.X) > 0) {
basic.showIcon(IconNames.SmallDiamond)
} else if (input.acceleration(Dimension.X) < -500) {
basic.showArrow(ArrowNames.West)
} else {
basic.showIcon(IconNames.SmallSquare)
}
})

basic.forever(function () {
if (input.temperature() < 15) {
basic.showLeds(`
# . # . #
. # # # .
# # # # #
. # # # .
# . # . #
`)
} else if (input.temperature() < 25) {
basic.showIcon(IconNames.Happy)
} else {
basic.showLeds(`
# . # . #
. # # # .
# # . # #
. # # # .
# . # . #
`)
}
})
Open task: any program that does what the step asks.
Stretch: Make the comfort meter show five ranges (freezing, cold, right, warm, hot) with four questions.
Support: Give students the if … else if … else already in forever with the pictures in, and ask them only to fill in the two questions.
if temperature > 0 … else if temperature > 30 … What shows at 35 degrees, and why?
The first part. 35 is more than 0, so the first question is true and the rest are skipped. Ask > 30 first.
Next unit: lists, which keep many values under one name. Class ideas: a tilt game where players hold the micro:bit level for ten seconds; a comfort meter by each classroom window with real micro:bits.