8.12.25
This week, we have been exploring how ‘if, then, else’ statements can be used to control what happens in a computer program.
To help them understand the idea of conditional decisions, pupils first connected these statements to real-life situations—such as “If it’s raining, then take an umbrella, else wear a hat.”
They then moved on to applying this logic using the micro:bit and MakeCode. The children created programs that responded to different inputs, including button presses, light levels and movement. By testing and refining their code, they discovered how ‘if, then, else’ statements allow the micro:bit to choose between different actions, making their programs interactive and intelligent.