wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Variables

Total questions: 24

Worksheet time: 12mins

Name
Class
Date
1.

A Variable is like a...

a)

Car

b)

Horse

c)

Container

d)

Hammer

2.

A String is a type of variable; What could it contain?

a)

String

b)

Selotape

c)

Only Numbers

d)

Letters and numbers

3.

One type of variable data that we studied was a string- What was the other data type that we looked at?

a)

Integer or Number

b)

Straw

c)

300

d)

x

4.

which of these is most typically a variable in a game?

a)

Sandwich

b)

Number of Lives

c)

Foot

d)

Input

5.

Which of these could be a name assigned to a variable?

a)

score

b)

x

c)

num1

d)

answer

e)

All of these

6.

The word 'variable' is from the late Latin word variabilis.

What does it mean?

a)

Feret

b)

Stays the same

c)

Changeable

d)

unreliable

7.

Here is a calculation using a variable -

score = score + 10

What happens in this statement?

a)

The score takes off 10

b)

Whatever score is, 10 will be added.

c)

West Ham win

d)

score cannot equal score + 10

8.

Which of these calculations can be used to count down the number of questions that a quiz program has asked?

a)

questionsLeft = questionsLeft -1

b)

questionsLeft =0

c)

questionsLeft = questionsLeft +1

d)

questionsLeft = kettle

9.

In the Python programming language, x -=1 is the same as...

a)

1 - x

b)

x is not a number and cannot be calculated

c)

Syntax error

d)

x = x -1

10.

In the Python programming language, == does what...

a)

Goes wrong

b)

is even more equal than normal

c)

Compares whatever is before it to whatever comes after it

d)

symbolises a

bi-plane

11.

Look at the diagram and state in which area variables are used...

a)

Output

b)

Processing

c)

Input

d)

Storage

12.

Look at the picture and state which code properly represents the variable...

a)

0 IS SCOREBOX

b)

Box of Zero Score

c)

SCORE = 0

d)

0 = SCORE

13.

It is logical to assign a variable a name that is related to the information that is stored in it; what name would you assign a variable for the information below...

'Harry'

a)

brother

b)

firstName

c)

Harry

d)

sandwich

14.

The principle of Boolean Logic, where there are only two possible states or outcomes, bears his name of the mathematician George Boole. Which one of these is considered a Boolean variable...

a)

score = 10

b)

name = "Boole"

c)

answer = num1 * num2

d)

answerOne = False

15.

In the Python programming language, x !=1 is the same as...

a)

X is dissapointingly equal to 1

b)

X does not equal 1

c)

X is nearly equal to 1

d)

X is upset with 1

16.

A car park system might store a variable called...

a)

spacesLeft

b)

numberOfCars

c)

lengthOfStay

d)

pricePerHour

e)

All of these are possible

17.

A supermarket till system might store a variable called...

a)

price

b)

total

c)

item

d)

transactionNum

e)

All of These

18.

A game might store a variable called...

a)

score

b)

health

c)

livesLeft

d)

item

e)

All of These

19.

Which operator shows that the variable called score is greater than or equal to 100

a)

score >= 100

b)

score <=100

c)

score = 100

d)

score = score

20.

Which operator means to multiply in programming?

a)

+

b)

*

c)

x

d)

/

21.

Which operator means to divide in programming?

a)

÷

b)

*

c)

x

d)

/

22.

In BBC BASIC <> means the same as != in Python...

What does <> mean?

a)

Not equal to

b)

Chattering Crocs

c)

Might be about (value)

d)

Obstacle

23.

What program also uses variables to make calculations or rules?

a)

Microsoft Excel

b)

Microsoft Word

c)

Adobe Photoshop

d)

Microsoft PowerPoint

24.

Linking a Variable to a String Using a + operator is called

a)

Linking

b)

Sandwich

c)

Concatenation

d)

SUM