Controlling with conditions

Controlling with conditions

warning

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

Lesson details

Key learning points

  1. In this lesson, we will examine different conditions and identify when they are true or false. The we will write statements using 'do until'. Lastly, we will connect a switch to a Crumble microcontroller and write a program using that input as a condition.

Licence

This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.

Loading...

3 Questions

Q1.
What condition will stop the loop shown?
An image in a quiz
Correct answer: The button being pressed (A is Hi)
The program starting
The sparkle flashing 4 times
Q2.
What will happen while the condition false?
An image in a quiz
Nothing
Correct answer: The sparkle will flash on and off
The sparkle will stay on
Q3.
Why doesn't the repeating light pattern stop when the push switch is pressed?
An image in a quiz
The button needs to be pressed to start the sequence
Correct answer: The light pattern is inside a do forever loop
The light pattern will stop after each colour is lit once

Lesson appears in

UnitComputing / Selection In Physical Computing

Computing