PCEP-30-02 Practice Test

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

Question 46

What is the output of the following snippet?

  1. [1, 2, 3]
  2. [3, 3, 3]
  3. [3, 2, 1]
  4. [1, 1, 1]

Question 47

What snippet would you insert in the line indicated below to print The highest number is 10 and the lowest number is 1. to the monitor?

  1. None of the above.

Question 48

What is the output of the following snippet?

  1. ['Mary', 'had', 'a', 'little', 'lamb']
  2. ['Mary', 'had', 'a', 'lamb']
  3. ['Mary', 'had', 'a', 'ramb']
  4. No output, the snippet is erroneous

Question 49

What is the expected output of the following code?

  1. Paul
  2. Mary
  3. The code is erroneous.
  4. None of the above.
  5. Peter

Question 50

What is the expected output of the following code?

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