Lesson details

Key learning points

  1. In this lesson, we will use the buttons to change the value of a variable using selection. We will then develop our programs to update the variable by using the micro:bit's accelerometer which senses motion. Finally, we will learn that a variable can be displayed after it is updated or in response to an input.

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.
Using the flow diagram below, which object has not got an engine, but can fly?
Aeroplane
Bicycle
Correct answer: Hot air balloon
Motorbike
Q2.
What would be displayed on the LEDs if button A is pressed?
A cross
Correct answer: A tick
A tick followed by a cross
Q3.
What text would be displayed if number 3 was generated?
Correct answer: Maybe
No
Yes

3 Questions

Q1.
What is the name of the variable in the code snippet below?
Correct answer: Answer.
Shake.
String.
Yes.
Q2.
Which of the following can be used to capture inputs on a micro:bit? (Tick 2 boxes)
Correct answer: Accelerometer.
Correct answer: Buttons A and B.
LED lights.
USB port.
Q3.
Which of these statements is correct?
When you read the value of a variable the value changes.
Correct answer: When you read the value of a variable the value remains.
When you read the value of a variable, the value is replaced.

Lesson appears in

UnitComputing / Sensing

Computing