Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python - Data types

Total questions: 26

Worksheet time: 10mins

Name
Class
Date
1.

A variable is a named value that can be changed in the program.

a)

False

b)

True

2.

What is a String?

a)

A data type that contains whole numbers. eg: 3, 45, 124

b)

Numbers with decimal point. eg: 0.5, 2.45, 56.04

c)

Group of characters between quotation marks. eg: "dog"

d)

Data type that can only be True or False.

3.

Which value is a String?

a)

64

b)

"cat"

c)

True

d)

0.5

4.

What is an Integer?

a)

A data type that contains whole numbers. eg: 3, 45, 124

b)

Numbers with decimal point. eg: 0.5, 2.45, 56.04

c)

Group of characters between quotation marks. eg: "dog"

d)

Data type that can only be True or False.

5.

Which value is an Integer?

a)

64

b)

"cat"

c)

True

d)

0.5

6.

What is a Float?

a)

A data type that contains whole numbers. eg: 3, 45, 124

b)

Numbers with decimal point. eg: 0.5, 2.45, 56.04

c)

Group of characters between quotation marks. eg: "dog"

d)

Data type that can only be True or False.

7.

Which value is a Float?

a)

64

b)

"cat"

c)

True

d)

0.5

8.

What is a Boolean?

a)

A data type that contains whole numbers. eg: 3, 45, 124

b)

Numbers with decimal point. eg: 0.5, 2.45, 56.04

c)

Group of characters between quotation marks. eg: "dog"

d)

Data type that can only be True or False.

9.

Which value is a Boolean?

a)

64

b)

"cat"

c)

True

d)

0.5

10.

Which writes a message for the user?

a)

input()

b)

myVar="Hi"

c)

print("Hello!")

d)

max=100

11.

Which data type is used to store:

100

a)

Integer

b)

Character

c)

Boolean

d)

String

12.

Which data type is used to store:

TRUE

a)

Boolean

b)

Real

c)

String

d)

Integer

13.

Which data type is used to store:

"&"

a)

Character

b)

String

c)

Integer

d)

Real

14.
This data type is used to store a mixture of letters and numbers and symbols.
a)
String
b)
Character
c)
Boolean
d)
Integer
15.

Which of these variables would be an integer data type?

a)

password

b)

passwordLength

16.

Which of these variables would use a string data type?

a)

password

b)

passwordSuccess (successful login)

c)

passwordLength

17.

What type of data would you store your age in numbers?

a)

Real

b)

Integer

c)

String

d)

Boolean

18.

What data type would you store a vehicle's registration plate?

a)

Real

b)

String

c)

Boolean

d)

Integer

19.

What type of data would you use to store the answer to 29 divided by 5?

a)

String

b)

Integer

c)

Real

d)

Character

20.

What type of data would you use to store whether someone wanted to sign up for promotions or not?

a)

String

b)

Boolean

c)

Real

d)

Integer

21.

What data type would you use to record someone's height so that it could be used in a calculation?

a)

Text

b)

String

c)

Integer

d)

Boolean

22.

Based on the names of the variables, Which of these variables would use a boolean data type?

a)

password

b)

passwordSuccess (successful login)

c)

passwordLength

23.

The following code example would print the data type of x, what data type would that be?

(a)  

24.

the following code exaple would print the data type of x, what data type would that be?

(a)  

25.

The following code example would print the data type of x, what data type would that be?

(a)  

26.

The following code example would print the data type of x, what data type would that be?

(a)