wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

COMPUTING YEAR 5

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.

Why is it important to give a clear name to each variable?

                    A) It makes the code longer

                    B)It makes the code look fancy

                    C)It helps others understand the purpose of the variable

                    D)It is not important at all

a)
A) It makes the code longer
b)
B)It makes the code look fancy
c)
C)It helps others understand the purpose of the variable
d)
D)It is not important at all
2.

What is a variable in programming?

                    A) A fixed value

                    B) A changeable value

                    C) A constant value

                    D) A random value

a)
B) A changeable value
b)
D) A random value
c)
C) A constant value
d)
A) A fixed value
3.

What is the way with which computers represent data?

                    A) In letters and numbers

                    B) In colours and shapes

                    C) In binary code, using 0 and 1

                    D) In words and sentences

 

a)
A) In letters and numbers
b)
B) In colours and shapes
c)
D) In words and sentences
d)

C) In binary code, using 0 and 1

4.

If you were to write your name using binary code, what would each letter be represented by?

                    A) 0 and 1

                    B) Different colours

                    C) Shapes and patterns

                    D) Words and phrases

a)
D) Words and phrases
b)
C) Shapes and patterns
c)
B) Different colours
d)
A) 0 and 1
5.

   What does a variable allow you to do in a program?

                   A)Store and manipulate data

                   B) Print text on the screen

                   C) Create loops

                   D) Change the program's colour.

 

a)
F) Cook dinner
b)
G) Drive a car
c)
A)Store and manipulate data
d)
E) Play music
6.

  What is the purpose of using variables in algorithms?

                   A) To make the code confusing

                   B) To save time while coding

                   C) To store and manage data

                   D) To create errors in the program

a)

C) To store and manage data

b)
D) To create errors in the program
c)
B) To save time while coding
d)
A) To make the code confusing
7.

Why do computers use binary code to represent data?

                    A) Because it's easy to use

                    B) Because it's the language the computer understands

                    C) Because binary code is difficult to understand

                    D) Because it's colourful and fun

a)
C) Because it's the language the computer doesn't understand
b)
B) Because it's the language the computer understands
c)
A) Because it's difficult to use
d)
D) Because it's boring and not fun
8.

Which of the following is the smallest unit of data used in computers?

                  A) Bit

                  B) Byte

                  C) Kilobyte

                  D) Megabyte

 

a)
A) Bit
b)
E) Gigabyte
c)
F) Terabyte
d)
G) Megabit
9.

What is the purpose of using variables in algorithms?

                  A) To make the code confusing

                  B)To save time while coding

                  C)To store and manage data

                  D) To create errors in the program

 

a)

C) To store and manage data

b)
D) To create errors in the program
c)
B) To save time while coding
d)
A) To make the code confusing
10.

    What is the correct way to represent a text string in a variable?

                  A) name

                 B) action

                 C) drama

                 D) phone.

a)
G) table
b)
F) chair
c)
E) computer
d)

A) name

11.

Which of the following is a storage device?

                  A) USB flash drive

                  B) Monitor

                  C) OCR

                  D) Keyboard

a)
A
b)
D
c)
C
d)
B
12.

What is an algorithm?

                  A) A type of computer hardware

                  B) A set of rules or instructions for solving a problem

                  C) A computer program

                  D) A physical device

a)
A) A type of computer software
b)
C) A type of computer virus
c)
D) A type of computer peripheral
d)

B) A set of rules or instructions for solving a problem

13.

Which keyword is commonly used in a conditional statement to represent "ELSE"?

                   A)WHEN

                   B)OTHERWISE

                   C)ELSE

                   D) OTHERWISE IF

a)
A) WHEN
b)
B) OTHERWISE
c)
D) OTHERWISE IF
d)

C) ELSE

14.

    What is the purpose of a conditional statement in programming?

                   A)To confuse the programmer

                   B)To execute code only if a certain condition is met

                   C)To create errors in the program

                   D)To print text on the screen

a)

B) To execute code only if a certain condition is met

b)
To print text on the screen
c)
To create errors in the program
d)
To confuse the programmer
15.

    Which of the following is an example of an algorithm?

                    A) A computer mouse

                    B) A list of computer parts

                    C) Step-by-step instructions for making a sandwich

                    D) A computer screen

a)
A computer mouse
b)
A list of computer parts
c)

C) Step-by-step instructions for making a sandwich

d)
A computer screen
16.

   What is the main function of an algorithm?

                    A) To make a computer program look fancy

                    B) To make a computer program run as slowly as possible

                    C) To solve a problem or complete a task in a systematic way

                    D) To confuse computer users

 

a)
B) To make a computer program run as slowly as possible
b)
D) To confuse computer users
c)
C) To solve a problem or complete a task in a systematic way
d)
A) To make a computer program look fancy
17.

   Which keyword is commonly used in a conditional statement to represent "IF"?

                   A)WHEN

                   B)BUT

                   C)IF

                   D) THEN

 

a)
D) THEN
b)
B) BUT
c)

C) IF

d)
A) WHEN
18.

What does the "ELSE" part of a conditional statement allow you to do?

                  A)Repeat the code

                  B)Skip the code

                  C)Execute an alternative code if the condition is not met

                  D)Print a message on the screen

a)

C) Execute an alternative code if the condition is not met

b)
D) Print a message on the screen
c)
B) Skip the code
d)
A) Repeat the code
19.

1.    What is an algorithm that contains selection?

                  A) A set of instructions for drawing pictures

                  B) A sequence of steps for solving maths problems

                  C) A series of if-then decisions to solve a problem

                  D) A list of random words

a)
B) A sequence of steps for baking a cake
b)
A) A set of instructions for drawing pictures
c)
D) A list of random words
d)
C) A series of if-then decisions to solve a problem
20.

   Why are "if-then" decisions important in algorithms?

                  A) They make the algorithm shorter

                  B) They add complexity to the algorithm

                  C) They allow the algorithm to make choices based on certain conditions.

                  D) They make the algorithm colourful

a)
B) They add complexity to the algorithm
b)
D) They make the algorithm colourful
c)

C) They allow the algorithm to make choices based on certain conditions.

d)
A) They make the algorithm shorter
21.

  In a simple IF-THEN statement, when is the code inside the "THEN" block executed?

                  A)Always

                  B)Only if the condition is true

                  C)Only if the condition is false

                  D)Before checking the condition

 

a)
A)Always
b)
C)Only if the condition is false
c)
D)Before checking the condition
d)
B)Only if the condition is true
22.

When is the code inside the "ELSE" block executed in a conditional statement?

                   A)Always

                   B)Only if the condition is true

                   C)Only if the condition is false

                   D)Before checking the condition

a)
A) Only on weekends
b)
B) Only if the moon is full
c)
D) After the condition is met
d)

C)Only if the condition is false

23.

   In an algorithm for making a sandwich, what would be a condition for using a selection statement?

                   A) To check if the sandwich has lettuce

                   B) To determine the colour of the plate

                   C) To count the number of ingredients

                   D) To decide whether to add mayo or ketchup

a)
A
b)
D
c)
B
d)
C
24.

In an algorithm for a traffic light, how would you use selection statements to control the light's behaviour at an intersection?

                  A) Set the light to always show green.

                  B) Use a random selection for the light's colour.

                  C) Check the traffic conditions and change the light accordingly

                  D) Only use red lights.

a)
B) Use a random selection for the light's colour.
b)
D) Only use red lights.
c)

C) Check the traffic conditions and change the light accordingly

d)
A) Set the light to always show green.
25.

    Which of the following storage devices is used to store the largest amount of data?

                    A) USB flash drive

                    B) DVD-ROM

                    C) Hard disk drive (HDD)

                    D) CD-ROM

 

a)
C) Hard disk drive (HDD)
b)
D) CD-ROM
c)
B) DVD-ROM
d)
A) USB flash drive