Free PCAP-31-03 Exam Braindumps (page: 18)

Page 17 of 37

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

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

Answer(s): A,B

Explanation:

>>> print(len(a)==len(b))
True
>>> print(a[0]-1==b[0])
True
>>> print(a[0]==b[0])
False
>>> print(b[0]-1 == a[0])
False



Which of the following statements are true? (Select two answers)

  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

Answer(s): B,C


Reference:

https://docs.python.org/2/tutorial/introduction.html



Which of the following sentences are true? (Select two answers)

  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

Answer(s): B,D


Reference:

https://www.afternerd.com/blog/python-lists-for-absolute-beginners/



Assuming that String is six or more letters long, the following slice String[1:-2]
is shorter than the original string by:

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

Answer(s): B






Post your Comments and Discuss Python Institute PCAP-31-03 exam with other Community members:

PCAP-31-03 Discussions & Posts