PCEP-30-02 Practice Test

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

Question 71

What is the expected output of the following code?

  1. 0
  2. 1
  3. False
  4. True

Question 72

What is the output of the following snippet?

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

Question 73

Insert the correct snippet to convert the t tuple to a dictionary named d. Expected output: Code:

  1. t >> d.dict
  2. d = dict(t)
  3. d.dict(t)
  4. d = t(dict)

Question 74

How many elements does the my_list list contain?

  1. one
  2. three
  3. two

Question 75

What is the expected output of the following code?

  1. 7 23 42
  2. 7 42 23
  3. 42 23 7