PCEP-30-02 Practice Test

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

Question 86

What is the expected output of the following code?

  1. The code is erroneous and cannot be run.
  2. ppf
  3. pizzapastafolpetti
  4. 213

Question 87

What is true about tuples? (Choose two.)

  1. Tuples can be subtracted using the ‒ operator.
  2. The for loop can be used to iterate through a tuple.
  3. A one-element tuple can be coded as <1, > or 1, .
  4. A tuple can be expanded using the .append() method.

Question 88

What would you insert instead of ???, so that the program checks for even numbers?

  1. x % ‘even’ == True
  2. x % 2 == 1
  3. x % 2 == 0
  4. x % x == 0
  5. x % 1 == 2

Question 89

What value will be assigned to the x variable?

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

Question 90

What is the expected output of the following code? x = 1 // 5 + 1 / 5 print(x)

  1. 0
  2. 0.2
  3. 0.0
  4. 0.4