NEW
Font size
WorksheetsY7 Unit 3: Microbit Programming (Python) End of Unit Quiz
Total questions: 15
Worksheet time: 8mins
Look at the code here. Which is the first line a variable is assigned in ?
line 1
line 2
line 3
line 5
An iteration, or loop, is when a program repeats a section of code. In which line has a loop, or iteration been set up?
line 2
line 3
line 5
line 6
Most computer devices work by accepting inputs, processing (making calculations), and producing an output. Which line is an output of the microbit?
line 2
line 5
line 3
line 9
In lines 6-9 of this code, the microbit changes the value of the variable x based on whether button a or b is pressed. Is this an example of..?
Iteration
Selection
Sequence
an error
In this example of Microbit code, what number do the LEDs show in line 3, if no button has been pressed?
no display
2
0
1
In the Microbit code, what number will be displayed on the LEDs if button a is pressed?
The LEDs will display the number 0
The LEDs will display the number 2
The LEDs will still display the number 1
Nothing will be on the LED dispay
In the Microbit code, what number will be displayed on the LEDs if button b is pressed?
The LEDs will display the number 0
The LEDs will display the number 2
The LEDs will still display the number 1
Nothing will be on the LED dispay
The programmer has realised that the new value of x does not change when a button is pressed because line 3 is in the wrong place - it should be on line 10. Which description best describes this problem?
The code sequence is incorrect
The code selection is incorrect
The code iteration is incorrect
The code syntax is incorrect
The programmer has now corrected his code. What number will now display on the LEDs when button a is pressed ?
1
0
2
no display
What number will now display on the LEDs when button b is pressed ?
1
0
2
no display
In the code pictured, which line contains a list or array ?
line 1
line 3
line 4
line 6
In this Microbit code, which line contains a variable ?
line 6
line 4
line 3
line 2
In the array, or list, in line 4, how many images are in the list?
1
2
3
4
In line 8, the LEDs will display the images in order whilst pin 0 is being touched. How long in seconds will each iimage be on the display?
1 second
10 seconds
100 seconds
1000 seconds
If pin 1 is touched, what will appear on the LED display?
The animation of three images
3
The word "number"
An image of a potato
