Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Micro:bit Quiz

Total questions: 30

Worksheet time: 15mins

Name
Class
Date
1.

What part of the Micro:bit detects movement like shaking or tilting?

a)

LED screen

b)

Button

c)

Accelerometer

d)

Light sensor

2.

What command checks if Button A was pressed?

a)

button_a.pressed()

b)

buttonA.press

c)

button_a.was_pressed()

d)

if A pressed:

3.

What does display.show(Image.HAPPY) do?

a)

Scrolls text

b)

Plays music

c)

Shows a smiley face

d)

Turns off LEDs

4.

How many LEDs are on the Micro:bit screen?

a)

5

b)

10

c)

20

d)

25

5.

What is the purpose of sleep(1000)?

a)

Clear the screen

b)

Pause the program for 1 second

c)

Start a timer

d)

Exit the loop

6.

What type of values does random.randint(1, 6) return?

a)

String

b)

List

c)

Integer (number)

d)

Boolean

7.

What is the correct way to scroll a message on the screen?

a)

scroll("Hi!")

b)

display.text("Hi")

c)

display.scroll("Hi!")

d)

show.scroll("Hi!")

8.

Which module must be imported to use random.randint()?

a)

microbit

b)

math

c)

random

d)

time

9.

What does display.clear() do?

a)

Deletes your code

b)

Resets the program

c)

Turns off the LED display

d)

Makes the image brighter

10.

Which part of the Micro:bit is used for displaying images and numbers?

a)

LED screen

b)

Battery

c)

Accelerometer

d)

Buttons

11.

Which of these is a built-in image in Micro:bit Python?

a)

Image.SAD

b)

Image.BIG

c)

Image.HAPPYFACE

d)

Image.HELLO

12.

What does this do: if button_b.was_pressed()?

a)

Waits for any button

b)

Checks if Button B was pressed once

c)

Keeps checking Button B forever

d)

Scrolls the letter B

13.

What will random.randint(1, 3) return?

a)

Only 1

b)

A random letter

c)

A random number: 1, 2, or 3

d)

An error

14.

What command is used to check shaking?

a)

accelerometer.shake()

b)

accelerometer.was_gesture("shake")

c)

shake.detect()

d)

input.shake()

15.

What is the correct way to write an infinite loop in Micro:bit Python?

a)

loop forever:

b)

repeat:

c)

while True:

d)

for forever:

16.

Which keyword is used to run code only when a condition is true?

a)

check

b)

if

c)

when

d)

then

17.

What is the shape of the Micro:bit LED grid?

a)

6x6

b)

5x5

c)

4x5

d)

8x8

18.

What happens if display.show(5) is used?

a)

Shows the number 5

b)

Shows 5 images

c)

Scrolls 5 quickly

d)

Gives an error

19.

Which of the following is a Boolean value?

a)

0

b)

1

c)

True

d)

3.14

20.

Which command waits before doing the next step?

a)

pause()

b)

delay()

c)

sleep()

d)

wait()

21.

What does Image.HEART do?

a)

Scrolls "heart"

b)

Shows a heart symbol

c)

Plays a sound

d)

Sends data

22.

What is the purpose of using str() in Micro:bit display?

a)

To change a number into text

b)

To scroll an image

c)

To stop the program

d)

To clear the display

23.

Which of these will cause the program to repeat again and again?

a)

repeat:

b)

while True:

c)

if forever:

d)

loop forever:

24.

What gesture is used to activate a motion-based program?

a)

Tap

b)

Swipe

c)

Shake

d)

Press

25.

What is needed at the top of every Micro:bit Python program?

a)

import everything

b)

start()

c)

from microbit import *

d)

main()

26.

Which command is used to detect if the device is tilted?

a)

tilt.check()

b)

get_position()

c)

accelerometer.get_x()

d)

position.x()

27.

What will happen if there is no while True: loop?

a)

The code won’t run

b)

The code only runs once

c)

It repeats automatically

d)

The program freezes

28.

What does display.show("5") do?

a)

Scrolls the number

b)

Shows the number 5

c)

Clears the screen

d)

Scrolls five times

29.

How do you stop the Micro:bit from showing anything?

a)

display.pause()

b)

display.clear()

c)

display.sleep()

d)

display.reset()

30.

What happens if two buttons are pressed but only Button A is checked in the code?

a)

Nothing happens

b)

Button A's code will run

c)

Button B’s code will run

d)

Error occurs