WorksheetsDice Quiz
Total questions: 4
Worksheet time: 2mins
What is the purpose of the setDicePatterns function in this program?
To roll a random number
To detect shaking motion
To create and store the 6 dice face images in a list
To play a sound when shaking
Why does the rollDice function use pick random 0 to 5?
Because the Micro:bit cannot generate numbers above 5
Because there are 6 dice images stored starting at index 0
To ensure the dice always shows number 1
To avoid errors in the program
What event triggers the dice to roll again in this program?
When button A is pressed
When button B is pressed
When the Micro:bit is reset
When the Micro:bit is shaken
What does the offset 0 mean in get value at index ... offset 0?
It shifts the index by 1
It halves the list length
It means use the value at the exact index with no shift
It creates a new list
