wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

G(7) Quiz#4 - L3.4

Total questions: 9

Worksheet time: 5mins

Name
Class
Date
1.

subjects_list = []

This code line will

a)

create an empty list

b)

print list

c)

delete an element

d)

None of the above

2.

True/False: A list is an example of a data structure.

a)

True

b)

False

3.

A ___________ is a type of variable that can hold many values.

a)

Loop

b)

if condition

c)

data structure

d)

None of the above

4.

Traverse a list means

a)

looking at every value

b)

printing a list

c)

deleting a list

d)

None of the above

5.

We can traverse a list using a

a)

variable

b)

print

c)

for loop

d)

None of the above

6.

for i in range(5):

^

This loop will repeat

a)

i times

b)

4 times

c)

5 times

d)

None of the above

7.

The number that stops the loop is called

a)

pause value

b)

stop value

c)

element value

d)

None of the above

8.

colors = ["blue", "pink", "yellow"]

Select the code to get the list length

a)

print(colors)

b)

colors[i]

c)

len(colors)

d)

None of the above

9.

colourList = ["red","yellow","blue","green"]

stop = len(coloursList)

the value of stop is equal to

a)

3

b)

4

c)

5

d)

None of the above