PCEP-30-02 Practice Test

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

Question 51

What is the expected output of the following code?

  1. 0
  2. 1
  3. The code is erroneous.
  4. 2

Question 52

What is the expected output of the following code?

  1. The code is erroneous.
  2. ['Peter', 'Jane', 'Mary']
  3. ['Peter', 'Jane']
  4. ['Paul', 'Mary', 'Jane']

Question 53

What is the expected output of the following code?

  1. 2 4
  2. 1 3
  3. 3 1
  4. 4 2

Question 54

What is the expected output of the following code?

  1. 4
  2. 10
  3. Nothing gets printed.
  4. The code is erroneous.

Question 55

After execution of the following snippet, the sum of all vals elements will be equal to:

  1. 4
  2. 5
  3. 2
  4. 3