wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Variables and Data types

Total questions: 15

Worksheet time: 15mins

Name
Class
Date
1.

What is a variable?

a)

A constant value

b)

A container for storing data

c)

A mathematical operation

d)

A programming language

2.

Which of the following is NOT a data type?

a)

Integer

b)

String

c)

Boolean

d)

Loop

3.

What is the data type of the variable "age" if it stores a person's age?

a)

Integer

b)

String

c)

Boolean

d)

Float

4.

Which data type is used to store true or false values?

a)

Integer

b)

String

c)

Boolean

d)

Float

5.

What is the data type of the variable "name" if it stores a person's name?

a)

Integer

b)

String

c)

Boolean

d)

Float

6.

Which data type is used to store decimal numbers?

a)

Integer

b)

String

c)

Boolean

d)

Float

7.

What is the data type of the variable "isRaining" if it stores whether it is currently raining or not?

a)

Integer

b)

String

c)

Boolean

d)

Float

8.

What is the data type of the variable "temperature" if it stores the current temperature in degrees Celsius?

a)

Integer

b)

String

c)

Boolean

d)

Float

9.

Which data type is used to store whole numbers?

a)

Integer

b)

String

c)

Boolean

d)

Float

10.

What is the data type of the variable "isStudent" if it stores whether a person is a student or not?

a)

Integer

b)

String

c)

Boolean

d)

Float

11.

What is the data type of the variable "weight" if it stores a person's weight in kilograms?

a)

Integer

b)

String

c)

Boolean

d)

Float

12.

What is the data type of the variable "isSunny" if it stores whether it is currently sunny or not?

a)

Integer

b)

String

c)

Boolean

d)

Float

13.

Which data type is used to store a true or false value in more memory-effecient way?

a)

Integer

b)

String

c)

Boolean

d)

Float

14.

What is the data type of the variable "grade" if it stores a student's letter grade?

a)

Integer

b)

String

c)

Boolean

d)

Float

15.

What is the data type of the variable "price" if it stores the cost of an item in dollars?

a)

Integer

b)

String

c)

Boolean

d)

Float