wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Python list

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What value is printed to the console?

a)

13

b)

4

c)

22

d)

17

e)

-2

2.

What is printed to the console?

a)

13

b)

4

c)

17

d)

22

3.

What value is printed to console?

a)

22

b)

17

c)

-2

d)

4

4.

thisList = ["square", "circle", "triangle", "octagon"]

print(thisList[3])

a)

octagon

b)

triangle

c)

circle

d)

square

5.

num = [1, 2, 3, 4]

num.append(0)

print(num)

What is the output?

a)

[0,1,2,3,4]

b)

[1,2,3,4,5]

c)

[0,1,2,3]

d)

[1,2,3,4,0]

6.

music = ["rock", "jazz", "blue", "hiphop"]

What is the value of music[-3]?

a)

rock

b)

jazz

c)

blue

d)

hiphop

7.

music = ["rock", "jazz", "blue", "hiphop"]

What is the value of music[2]?

a)

rock

b)

jazz

c)

blue

d)

hiphop

8.

music = ["rock", "jazz", "blue", "hiphop"]

What is the index of "hiphop"?

a)

1

b)

2

c)

3

d)

4

9.

Which one is the list?

a)

{"pop", "rock", "jazz", "blue", "hiphop"}

b)

{"pop": "kpop", "blue", "rock", "jazz": "hiphop"}

c)

["pop", "rock", "jazz", "blue", "hiphop"]

d)

("pop", "rock", "jazz", "blue", "hiphop")

10.

Which one is true about list?

a)

store only the same data type

b)

the item is ordered by index

c)

access by using key

d)

can't change the value in the list