wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Unit 5

Total questions: 56

Worksheet time: 46mins

Name
Class
Date
1.

What is MicroPython?

a)

A new type of Micro:bit hardware

b)

A simplified version of Python specifically for the Micro:bit

c)

A programming language used only for industrial robots

d)

A web browser

2.

What is the term for the rules of a programming language?

a)

Logic

b)

Cast

c)

Syntax

d)

Algorithm

3.

The light sensor on the Micro:bit returns values in what range?

a)

0 - 100

b)

0 - 1024

c)

0 - 255

d)

1 - 10

4.

Which command is used to read the light level?

a)

display.read_light_level()

b)

microbit.light_sensor()

c)

read.light()

d)

display.get_brightness()

5.

What is the primary purpose of a "For" loop?

a)

To repeat code forever.

b)

To repeat code for a specific number of times

c)

To run code only when Button A is pressed

d)

To delete data in an array

6.

What does "Cast" mean in MicroPython programming?

a)

To copy a block of code

b)

To delete a variable

c)

To change the data type of a variable

d)

To connect via Bluetooth

7.

In the array images = [Image.HAPPY, Image.SAD, Image.ANGRY], at which index is Image.HAPPY located?

a)

1

b)

0

c)

-1

d)

2

8.

Which tool helps track variable values to find errors in a program?

a)

Test plan

b)

Array

c)

Trace table

d)

Flowchart

9.

When testing a program for age input (1 to 100), what is the value "100" called?

a)

Normal data

b)

Invalid data

c)

Extreme data

d)

Random data

10.

Why is while True: used in most Micro:bit programs?

a)

To make the program run faster

b)

To save battery life

c)

To continuously check and respond to events (button presses, sensors)

d)

To save memory

11.

Write a line of code to declare an array named list_numbers containing: 5, 10, 15, 20.

(a)  

12.

Look at the following code:
for i in range(1, 4):

display.show(i)

sleep(500)
Which numbers will the program display on the LED screen?

(a)  

13.

Why must we use the str(number) command when we want the Micro:bit to "speak" a number using the speech library?

4 lines
14.

Write pseudocode or MicroPython code for: When Button A is pressed, show a heart image (Image.HEART); when Button B is pressed, clear the screen.

2 lines
15.

In a test plan for an exam score input (range 0 to 10), which of the following best describes the difference between Normal data and Invalid data?

a)

Normal data is 5 (within range); Invalid data is 10 (at the boundary)

b)

Normal data is 7 (within range); Invalid data is "Ten" or -5 (wrong type or out of range)

c)

Normal data is 0 (at the boundary); Invalid data is 11 (just outside range)

d)

Normal data is any number; Invalid data is only text

16.

SET counter TO 0

FOR i FROM 1 TO 5 STEP 1:

SET counter TO i * 2

END FOR

DISPLAY counter

a)

5

b)

8

c)

10

d)

2

17.

SET icons TO [Image.HAPPY, Image.SAD, Image.GHOST, Image.SKULL]

SET index TO 2

DISPLAY icons[index]

a)

Image.HAPPY

b)

Image.SAD

c)

Image.GHOST

d)

Image.SKULL

18.

SET light_level TO 100

IF light_level < 50 THEN:

DISPLAY "DARK"

ELSE IF light_level > 150 THEN:

DISPLAY "BRIGHT"

ELSE:

DISPLAY "OK"

END IF

a)

DARK

b)

BRIGHT

c)

OK

d)

Error

19.

SET total TO 0

FOR number FROM 1 TO 3:

SET total TO total + number

END FOR

SET output TO CAST(total AS STRING)

DISPLAY "Result: " + output

a)

Result: 3

b)

Result: 6

c)

Result: 123

d)

Error

20.

FOR count FROM 3 TO 1 STEP -1:

DISPLAY count

SLEEP 500ms

END FOR

DISPLAY "GO!"

a)

1, 2, 3, GO!

b)

3, 2, 1, GO!

c)

3, 2, GO!

d)

3, 1, GO!

21.

Device that can be programmed using block or text-based programming languages.

a)

Physical computing device

b)

Microprocessor

c)

Count-controlled loop

d)

Platform

22.

Written lines of code using a specific programming language, e.g. Python.

a)

Offline programming

b)

Block-based program

c)

Pseudocode

d)

Text-based programming

23.

Device that has one circuit but the input, process and output functions of a computer.

a)

Transistor

b)

Motherboard

c)

Microprocessor

d)

Server

24.

Instructions that tell a computer system how to complete a task.

a)

Statement

b)

Program

c)

Class

d)

Event

25.

Individual code blocks connected together to create a program.

a)

Block-based program

b)

Pseudocode

c)

Count-controlled loop

d)

Text-based programming

26.

Hardware and operating system that runs an application.

a)

Array

b)

Desktop

c)

Platform

d)

Database

27.

Detects a change in direction of a device.

a)

Accelerometer

b)

Hygrometer (Measures humidity)

c)

Multimeter (Measures electricity)

d)

Magnetometer (Measures magnetic fields/compass direction)

28.

Device that can be programmed using block or text-based programming languages.



(a)  

29.

Pins at the bottom of the micro:bit that allow additional inputs and outputs to be added through crocodile clips.

a)

USB Port

b)

Battery Connector

c)

Reset Button

d)

General-purpose input output (GPIO)

30.

Cable for creating a temporary electrical connection between devices.

a)

USB Cable

b)

Power Lead

c)

Crocodile clip

d)

Ethernet Cable

31.

Error in program code that stops the program from running.

a)

Syntax Error

b)

Feature

c)

Algorithm

d)

Logic

32.

Textual representation of an algorithm.

a)

Software

b)

Hardware

c)

Pseudocode

d)

Compiler

33.

Completes a check to see whether set criteria is either True or False.

a)

Variable

b)

Loop

c)

Selection (Boolean check)

d)

Conditional statement

34.

Document that details the tests to be carried out when a program is complete and whether or not they are successful.

a)

User Manual

b)

Test Plan

c)

Source Code

d)

Flowchart

35.

(a)   is the data of the correct type that should be accepted by a program.

36.

(a)   is defined as acceptable input but at the ends of the possible input range.

37.

" (a)   is defined as data that should be rejected by a program."

38.

"A (a)   is a randomly generated number in a program that can be set within a range."

39.

A (a)   is a named memory location that can store a value."

40.

"An (a)   is a data structure in a program that can store more than one item of data of the same data type under a single identifier; data items can be changed."

41.

"The way a variable or array is named in programming is called a (a)   ."

42.

" (a)   is a naming style where all letters are lowercase, and from the second word the first letter is capitalised."

43.

" (a)   is a naming style where all letters are lowercase, and spaces are replaced with underscores ( _ )."

44.

"A (a)   is defined as a whole number."

45.

"A (a)   is a piece of information that represents part of the data that makes up a person, place or thing."

46.

"A (a)   is a sequence of characters that can be text, numbers or symbols; quotation marks around the characters are used to define it."

47.

"A numerical reference for a location of a piece of data stored in an array is called an (a)   ."

48.

"The (a)   is the Python or MicroPython loop used for a count-controlled loop."

49.

"A(n) (a)   is a variable that stores the number of times an iteration has iterated."

50.

"A(n) (a)   is a set of step-by-step instructions to solve a particular problem."

51.

"A(n) (a)   is a sub-program that can exist as part of a bigger program."

52.

" (a)   is the classification applied to a data item specifying which type of data that item represents (such as currency, text, or number)."

53.

" (a)   is a set of rules that must be met."

54.

" (a)   refers to one programming construct, such as selection, occurring inside another construct, such as a count-controlled loop."

55.

"A(n) (a)   is an initial product created for testing and reviewing, before a final product is released."

56.

" (a)   is a choice added to a program using if... elif... else, where the next instruction is decided by the outcome of a condition."