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

Page 4 of 37

What is the expected behavior of the following code?

  1. it raises an exception
  2. it outputs True
  3. it outputs False
  4. it outputs nothing

Answer(s): B



Which of the following expressions evaluate to True? (Select two answers)

  1. 121 + 1 != '!' + 2 * '2'
  2. 'AbC' lower () < 'AB'
  3. '1' + '1' + '1' < '1' * 3'
  4. '3.14' != str(3.1415)

Answer(s): A,D



Which of the following expressions evaluate to True? (Select two answers)

  1. str(1-1) in '012345£739'[:2]
  2. 'phd' in 'alpha'
  3. 'deb' not in 'abcde' [::-1]
  4. 'True' not in 'False'

Answer(s): C,D



Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers)
string = 'python' [::2]
string = string[-1] + string[-2]

  1. string[0] == string[-1]
  2. string is None
  3. len (string] == 3
  4. string[0] == 'o'

Answer(s): B,C






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

PCAP-31-03 Discussions & Posts