Summative Assessment Answers - Physical Computing - Y9
Summative Assessment Answers - Physical Computing - Y9
Q2 Name at least two input devices that are built into the micro:bit.
Ans: Accelerometer
Buttons
Light sensor
Temperature sensor
Compass
Q3 You would like to build a micro:bit project that provides audio feedback to the
user, e.g. a beep or a short tune. Which of the following sentences is true?
A. It is not possible to generate audio output with the micro:bit.
B. It is possible to generate audio output with the micro:bit, by connecting
speakers to the built-in audio port.
C. It is possible to generate audio output with the micro:bit, by connecting
speakers to the GPIO pins.
Ans: C
Q4 Which sensor, built into the micro:bit, would be used in order to detect, ‘gestures’
such as shaking or titling?
A. Radio antenna
B. Accelerometer
C. Magnetometer
Ans: B
Task 2 .
Q5 In Figure 1, the LED is supposed to be controlled (turned on or off) using pin 0. The
arrow shows that one of the crocodile clips has not been connected to a pin.
Which pin should it be connected to?
A. Power (3V)
B. Ground (GND)
Ans: B
Q6 In Figure 1, you are supposed to use pin 0 to control the LED (turn it on or off).
Which piece of code would you use to turn the LED on, assuming the wiring is
correct?
A. pin0 = 1
B. pin0.read_digital() == 1
C. pin0.write_digital(1)
Ans: C
Task 3 .
Ans: A
A. pin0 == 1
B. pin0.read_digital() == 1
C. pin0.write_digital(1)
D. pin0.is_touched()
Ans: B
Task 4 .
Program 1
Q9 When Program 1 is executed, what will the user see on the micro:bit display after
button A has been pressed once?
Q10 When Program 1 is executed, what will the user see on the micro:bit display after
button A has been pressed twice?
D. Line 7 will be executed constantly, i.e. in every round of the while loop.
Ans: A
Task 5 .
Program 2
Q12 Fill in the gap in line 9 of Program 2 above, so that the value of the elapsed
variable is the (approximate) number of seconds between the time that line 4
was executed and the time that line 8 was executed.
Q13 Describe in one short sentence the purpose of lines 5 to 7 in Program 2 above.
Ans: The program waits, constantly checking for messages, until a “ping” message is received.
Task 6 .
You are asked to create a program for the micro:bit that:
● Starts by lighting up a single
pixel in the top left-hand
corner of the 5⨉5 LED matrix.
These are the program statements you can use, provided in no particular order.
Q14 Rearrange the statements and use indentation where necessary, so that the
resulting program works as specified. You can use statements more than once.
6 if button_b.was_pressed():
7 display.set_pixel(x, y, 0) # pixel off
8 x = x + 1 # go right
9 if x > 4:
10 y = y + 1 # next row
11 x = 0 # reset col
Q15 Select one of the statements below to replace the while True statement, so that
the program terminates when button B is pressed and the currently illuminated
pixel is at the bottom right-hand corner of the LED matrix.
A. while x <= 4:
B. while y <= 4:
Ans: B
Resources are updated regularly - the latest version is available at: the-cc.io/curriculum.