PCAP Practice Test

PCAP Practice Test practice questions, page 3 of 6, with answer review and explanations.

Question 11

Assuming that the following snippet has been successfully executed, which of the equations are True? (Choose two.)

  1. len(a) == len (b)
  2. b [0] +1 ==a [0]
  3. a [0] == b [0]
  4. a [0] + 1 ==b [0]

Question 12

Assuming that the following snippet has been successfully executed, which of the equations are False? (Choose two.)

  1. len(a)== len (b)
  2. a [0]-1 ==b [0]
  3. a [0]== b [0]
  4. b [0] - 1 ==a [0]

Question 13

Which of the following statements are true? (Choose two.)

  1. Python strings are actually lists
  2. Python strings can be concatenated
  3. Python strings can be sliced like lists
  4. Python strings are mutable

Question 14

Which of the following sentences are true? (Choose two.)

  1. Lists may not be stored inside tuples
  2. Tuples may be stored inside lists
  3. Tuples may not be stored inside tuples
  4. Lists may be stored inside lists

Question 15

Assuming that String is six or more letters long, the following slice is shorter than the original string by:

  1. four chars
  2. three chars
  3. one char
  4. two chars