wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Programming basics

Total questions: 11

Worksheet time: 6mins

Name
Class
Date
1.

Click the items that would be best represented using an integer data type

a)

Your friend's name

b)

Your dog's age

c)

Your height

d)

Your door number

2.

Which is the most appropriate data type for the name of a fruit?

a)

String

b)

Integer

c)

Boolean

d)

Float

3.

Which is the most appropriate data type for the quantity of books in a library?

a)

String

b)

Integer

c)

Boolean

d)

Float

4.

Which is the most appropriate data type for the weight of a baby?

a)

String

b)

Integer

c)

Boolean

d)

Float

5.

Which is the most appropriate data type for your mobile number?

a)

String

b)

Integer

c)

Boolean

d)

Float

6.

If you want to create a variable to record if the fridge door is open or not, what type would you use?

a)

String

b)

Boolean

c)

Integer

7.

What does this code do STRING_TO_INT ("123")?

a)

It converts the integer to a string

b)

It converts the string to an integer

8.

What does this code do CHAR_TO_CODE ("R")?

a)

It gives the number for the letter 'R'

b)

It print 'R' on the screen

9.

What is the answer to the code 20 MOD 5?

a)

0

b)

5

c)

2

10.

What is the symbol for MOD in Python?

a)

%

b)

//

c)

/

d)

**

11.

What is the symbol for exponentiation in Python?

a)

%

b)

//

c)

/

d)

**