wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Lesson 4 List

Total questions: 6

Worksheet time: 4mins

Name
Class
Date
1.

Here is the list:


Evens = [2, 4, 6, 8]


What's the result after running this command?


Evens.reverse()

a)

"Events" becomes "snevE"

b)

"Evens" = [8, 6, 4, 2]

c)

Evens = [1, 2, 3, 4]

d)

Events = [1, 3, 5, 7]

2.

What's the output of this code?

a)

[1, 2]

b)

[1, 2, 3]

c)

[1, 2, 3, 4]

d)

[1, 2, 3, 4, 5]

3.

What's the output of above code?

a)

[1, 2, 3, 4, 5, 6]

b)

[1, 2, 3, 4, 5]

c)

[1, 2, 3, 4]

d)

[1, 2, 3]

4.

What's the output of above code?

a)

[1, 2, 3, 4, 5]

b)

[2, 3, 4]

c)

[2, 3, 4, 5]

d)

[2, 3, 5]

5.

l = [2, 4, 5, 2]


What's l[l[3]]

(a)  

6.

In Python if a = [1,2,3],

a*2 = [1,2,3,1,2,3]


Then what's a*3?

a)

[1,2,3,1,2,3,1,2,3]

b)

[3,6,9]

c)

[[1,2,3], [1,2,3], [1,2,3]]