wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

S3 Python datatypes and variables

Total questions: 24

Worksheet time: 12mins

Name
Class
Date
1.

When storing a value in a variable, the variable must be on which side of the = symbol?

a)

Left

b)

Right

2.

A variable...

a)

Stores a piece of information in memory

b)

Is always a number

c)

stores more than one piece of information

d)

is always text

3.

A variable name can start with a number

a)

True

b)

False

4.

A variable name can include a number as long as it's not the first character

a)

True

b)

False

5.

Select the Integer

a)

2

b)

two

c)

2.0

d)

to

6.

Select the real number

a)

7

b)

Seven

c)

7.0

d)

777

7.

Which data type stores TRUE/FALSE values

a)

Integer

b)

Real

c)

Boolean

d)

Array

8.

Joining different variables together in a print statement using a + symbol, is an example of

a)

Concatenation

b)

Iteration

c)

Subscription

d)

Deletion

9.

What characters can you use to concatenate?

a)

+

b)

,

c)

#

d)

=

10.

== assigns a value to a variable

a)

True

b)

False

11.

Python uses indentation to

a)

indicate a block of code

b)

to make code easier to read

c)

indicate errors

12.

A phone number should be stored in a variable with what data type?

a)

Integer

b)

Float

c)

Boolean

d)

Text

13.

Variables need a meaningful name?

a)

True

b)

False

14.

The value of a variable can change during the execution of a program?

a)

True

b)

False

15.

The data "12 High Street" would be stored in a variable of what data type?

a)

String

b)

Integer

c)

Float

d)

Char

16.

Which of these types of information should be stored in a variable of data type Integer

a)

Phone Number

b)

Post Code

c)

Age

d)

Value of Pi

17.

Which of these types of information should be stored in a variable of data type Float

a)

Phone Number

b)

Post Code

c)

Age

d)

Value of Pi

18.

Which of these types of information should be stored in a variable of data type Boolean

a)

Phone Number

b)

Post Code

c)

TRUE/FALSE

d)

Value of Pi

19.

Which of these types of information should be stored in a variable of data type Char

a)

Phone Number

b)

Post Code

c)

Initial of forename

d)

Value of Pi

20.

"7" could be stored in a variable of type Char?

a)

True

b)

False

21.

"7" could be stored in a variable of type String?

a)

True

b)

False

22.

"7" could be stored in a variable of type Float?

a)

True

b)

False

23.

"7" could be stored in a variable of type Integer?

a)

True

b)

False

24.

A persons name should be stored in a variable as what data type?

a)

String

b)

Char

c)

Float

d)

Integer