Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Collections

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.
a)

IndexError: list index out of range

b)

13

c)

10

d)

12

e)

9

2.
a)

Orange

Mango

b)

Apple

Orange

Mango

c)

Mango

Orange

Apple

d)

Mango

Apple

e)

Apple

Mango

3.
a)

ValueError: list.remove(x): x not in list

b)

Apple

c)

Mango

d)

Orange

e)

orange

4.
a)

Kiwi

b)

Mango

c)

Orange

d)

Apple

e)

Error

5.
a)

Error

b)

[6.7, 7.7, 8.2, 8.1, 7.9, 5.8]

c)

[5.8, 6.7, 7.7, 8.2, 8.1, 7.9]

d)

[6.7, 7.7, 5.8, 8.2, 8.1, 7.9]

e)

[6.7, 7.7, 8.2, 8.1, 7.9]

6.
a)

(6.7, 7.7, 8.2, 8.1, 7.9)

b)

Error

c)

6.7, 7.7, 8.2, 8.1, 7.9

d)

[6.7, 7.7, 8.2, 8.1, 7.9]

e)

"6.7, 7.7, 8.2, 8.1, 7.9"

7.

Choose the appropriate code snippet which prints the following output.

My grade is 7

a)
b)
c)
d)
8.

# For the given code snippet, choose the appropriate code snippet to print the mark of NSS.

a)

print(marks['Non-academics']['NSS'])

b)

print(marks['NSS'])

c)

print(marks['NSS'])

d)

print(marks['Non-academics'])

e)

print(marks)

9.
a)

Error

b)

Physics

c)

80

d)

Physics : 80

e)

{'Physics': 80, 'Chemistry': 88, 'Mathematics': 92}

10.
a)

Error

b)

( )

c)

{'Physics': 80, 'Chemistry': 88, 'Mathematics': 92}

d)

{'Chemistry': 88, 'Mathematics': 92}

e)

{'Physics': 80, 'Chemistry': 88}