Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Dice Quiz

Total questions: 4

Worksheet time: 2mins

Name
Class
Date
1.

What is the purpose of the setDicePatterns function in this program?

a)

To roll a random number

b)

To detect shaking motion

c)

To create and store the 6 dice face images in a list

d)

To play a sound when shaking

2.

Why does the rollDice function use pick random 0 to 5?

a)

Because the Micro:bit cannot generate numbers above 5

b)

Because there are 6 dice images stored starting at index 0

c)

To ensure the dice always shows number 1

d)

To avoid errors in the program

3.

What event triggers the dice to roll again in this program?

a)

When button A is pressed

b)

When button B is pressed

c)

When the Micro:bit is reset

d)

When the Micro:bit is shaken

4.

What does the offset 0 mean in get value at index ... offset 0?

a)

It shifts the index by 1

b)

It halves the list length

c)

It means use the value at the exact index with no shift

d)

It creates a new list