# PCAP – Programming Essentials in Python Quizzes Module 2 Test Answers

Last Updated on October 18, 2019 by Admin

## PCAP – Programming Essentials in Python Quizzes Module 2 Test Answers

• =
• ===
• ==
• !=

• False
• 1
• True
• 0

• two
• zero
• one
• three

• zero
• one
• two
• three

• one
• two
• zero
• three

• two
• zero
• one
• three

• eight
• one
• four
• two

• 0
• 1
• True
• False

• 1
• 3
• 2
• 0

• 1
• -2
• 3
• -1

• [2,3,4]
• [2]
• []
• [2,3]

### vals = [0, 1, 2] vals[0], vals[2] = vals[2], vals[0]

• doesn’t change the list
• extends the list
• shortens the list
• reverses the list

• 2
• 5
• 3
• 4

### nums = [1,2,3] vals = nums del vals[1:2]

• nums is longer than vals
• vals is longer than nums
• nums and vals are of the same length
• the snippet will cause a runtime error

### nums = [1,2,3] vals = nums[-1:-2]

• nums is longer than vals
• nums and vals are of the same length
• the snippet will cause a runtime error
• vals is longer than nums

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

### l1 = [1,2,3] for v in range(len(l1)): l1.insert(1,l1[v]) print(l1)

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

• one
• four
• three
• two

• 4
• 2
• 7
• 6

### L = [[0, 1, 2, 3] for i in range(2)] print(L[2][0])

• the snippet will cause a runtime error
• 1
• 2
• 0