WorksheetsMicro:bit Quiz
Total questions: 30
Worksheet time: 15mins
What part of the Micro:bit detects movement like shaking or tilting?
LED screen
Button
Accelerometer
Light sensor
What command checks if Button A was pressed?
button_a.pressed()
buttonA.press
button_a.was_pressed()
if A pressed:
What does display.show(Image.HAPPY) do?
Scrolls text
Plays music
Shows a smiley face
Turns off LEDs
How many LEDs are on the Micro:bit screen?
5
10
20
25
What is the purpose of sleep(1000)?
Clear the screen
Pause the program for 1 second
Start a timer
Exit the loop
What type of values does random.randint(1, 6) return?
String
List
Integer (number)
Boolean
What is the correct way to scroll a message on the screen?
scroll("Hi!")
display.text("Hi")
display.scroll("Hi!")
show.scroll("Hi!")
Which module must be imported to use random.randint()?
microbit
math
random
time
What does display.clear() do?
Deletes your code
Resets the program
Turns off the LED display
Makes the image brighter
Which part of the Micro:bit is used for displaying images and numbers?
LED screen
Battery
Accelerometer
Buttons
Which of these is a built-in image in Micro:bit Python?
Image.SAD
Image.BIG
Image.HAPPYFACE
Image.HELLO
What does this do: if button_b.was_pressed()?
Waits for any button
Checks if Button B was pressed once
Keeps checking Button B forever
Scrolls the letter B
What will random.randint(1, 3) return?
Only 1
A random letter
A random number: 1, 2, or 3
An error
What command is used to check shaking?
accelerometer.shake()
accelerometer.was_gesture("shake")
shake.detect()
input.shake()
What is the correct way to write an infinite loop in Micro:bit Python?
loop forever:
repeat:
while True:
for forever:
Which keyword is used to run code only when a condition is true?
check
if
when
then
What is the shape of the Micro:bit LED grid?
6x6
5x5
4x5
8x8
What happens if display.show(5) is used?
Shows the number 5
Shows 5 images
Scrolls 5 quickly
Gives an error
Which of the following is a Boolean value?
0
1
True
3.14
Which command waits before doing the next step?
pause()
delay()
sleep()
wait()
What does Image.HEART do?
Scrolls "heart"
Shows a heart symbol
Plays a sound
Sends data
What is the purpose of using str() in Micro:bit display?
To change a number into text
To scroll an image
To stop the program
To clear the display
Which of these will cause the program to repeat again and again?
repeat:
while True:
if forever:
loop forever:
What gesture is used to activate a motion-based program?
Tap
Swipe
Shake
Press
What is needed at the top of every Micro:bit Python program?
import everything
start()
from microbit import *
main()
Which command is used to detect if the device is tilted?
tilt.check()
get_position()
accelerometer.get_x()
position.x()
What will happen if there is no while True: loop?
The code won’t run
The code only runs once
It repeats automatically
The program freezes
What does display.show("5") do?
Scrolls the number
Shows the number 5
Clears the screen
Scrolls five times
How do you stop the Micro:bit from showing anything?
display.pause()
display.clear()
display.sleep()
display.reset()
What happens if two buttons are pressed but only Button A is checked in the code?
Nothing happens
Button A's code will run
Button B’s code will run
Error occurs
