PCEP-30-02 Practice Test

PCEP-30-02 Practice Test practice questions, page 7 of 20, with answer review and explanations.

Question 31

What is the expected output of the following code?

  1. [7, 3, 23, 42]
  2. [7, 20, 23, 42]
  3. [10, 20, 42]
  4. [10, 20, 23, 42]

Question 32

Take a look at the snippet and choose one of the following statements which is true:

  1. vals is longer than nums
  2. nums and vals are of the same length
  3. nums is longer than vals

Question 33

What is the expected output of the following code?

  1. (1, 2)
  2. The code is erroneous.
  3. {'a':1, 'b':2}
  4. [1,2]

Question 34

How many elements does the L list contain?

  1. one
  2. two
  3. three
  4. zero

Question 35

What is the output of the following snippet?

  1. 1
  2. 0
  3. 6