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

Page 8 of 37

What is the expected output of the following snippet?

  1. True lower
  2. True upper
  3. False upper
  4. False lower

Answer(s): B



Which of the following lines of code will work flawlessly when put independently inside the add_new () method in order to make the snippet's output equal to [0, 1, 21 ? (Select two answers)

  1. self.queue.append(get_Iast() + 1)
  2. queue.append(self.get last () + 1)
  3. self.queue.append(self.queue[+1]
  4. self.queue.append(self.get last() +1)

Answer(s): D



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

  1. open () requires a second argument
  2. open () is a function which returns an object that represents a physical file
  3. instd, outstd, errstd are the names of pre-opened streams
  4. if invoking open () fails, an exception is raised

Answer(s): B,D



What is the expected behavior of the following code? x = 8 ** (1/3)
y = 2. if x < 2.3 else 3.
print(y)

  1. it outputs 2.0
  2. it outputs 2. 5
  3. the code is erroneus and it will not execute
  4. it outputs 3.0

Answer(s): A






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