wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Y7 Unit 3: Microbit Programming (Python) End of Unit Quiz

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

Look at the code here. Which is the first line a variable is assigned in ?

a)

line 1

b)

line 2

c)

line 3

d)

line 5

2.

An iteration, or loop, is when a program repeats a section of code. In which line has a loop, or iteration been set up?

a)

line 2

b)

line 3

c)

line 5

d)

line 6

3.

Most computer devices work by accepting inputs, processing (making calculations), and producing an output. Which line is an output of the microbit?

a)

line 2

b)

line 5

c)

line 3

d)

line 9

4.

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..?

a)

Iteration

b)

Selection

c)

Sequence

d)

an error

5.

In this example of Microbit code, what number do the LEDs show in line 3, if no button has been pressed?

a)

no display

b)

2

c)

0

d)

1

6.

In the Microbit code, what number will be displayed on the LEDs if button a is pressed?

a)

The LEDs will display the number 0

b)

The LEDs will display the number 2

c)

The LEDs will still display the number 1

d)

Nothing will be on the LED dispay

7.

In the Microbit code, what number will be displayed on the LEDs if button b is pressed?

a)

The LEDs will display the number 0

b)

The LEDs will display the number 2

c)

The LEDs will still display the number 1

d)

Nothing will be on the LED dispay

8.

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?

a)

The code sequence is incorrect

b)

The code selection is incorrect

c)

The code iteration is incorrect

d)

The code syntax is incorrect

9.

The programmer has now corrected his code. What number will now display on the LEDs when button a is pressed ?

a)

1

b)

0

c)

2

d)

no display

10.

What number will now display on the LEDs when button b is pressed ?

a)

1

b)

0

c)

2

d)

no display

11.

In the code pictured, which line contains a list or array ?

a)

line 1

b)

line 3

c)

line 4

d)

line 6

12.

In this Microbit code, which line contains a variable ?

a)

line 6

b)

line 4

c)

line 3

d)

line 2

13.

In the array, or list, in line 4, how many images are in the list?

a)

1

b)

2

c)

3

d)

4

14.

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?

a)

1 second

b)

10 seconds

c)

100 seconds

d)

1000 seconds

15.

If pin 1 is touched, what will appear on the LED display?

a)

The animation of three images

b)

3

c)

The word "number"

d)

An image of a potato