Controlling with conditions
Lesson details
Key learning points
- 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](/_next/image?url=https%3A%2F%2Foaknationalacademy-res.cloudinary.com%2Fimage%2Fupload%2Fv1707170910%2Fzzy2ly8oyfji1ujps3r7.png&w=384&q=75)
The program starting
The sparkle flashing 4 times
Q2.
What will happen while the condition false?
![An image in a quiz](/_next/image?url=https%3A%2F%2Foaknationalacademy-res.cloudinary.com%2Fimage%2Fupload%2Fv1707170880%2Foliuo4y3lpbukqbmel1l.png&w=384&q=75)
Nothing
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](/_next/image?url=https%3A%2F%2Foaknationalacademy-res.cloudinary.com%2Fimage%2Fupload%2Fv1707170918%2Fef2m7rwhch81xx8tr3gr.png&w=384&q=75)
The button needs to be pressed to start the sequence
The light pattern will stop after each colour is lit once