Free PCAP-31-03 Exam Braindumps

What is the expected output of the following code?
def foo(x,y,z):
return x(y) - x(z)
print{f00(lambda x: x % 2, 2, 1) )

  1. 1
  2. 0
  3. -1
  4. an exception is raised

Answer(s): C



Assuming that the following code has been executed successfully, select the expressions which evaluate to True (Select two answers)

  1. a is b
  2. b( ) > 2
  3. a() > 2
  4. a is not None

Answer(s): B,C,D



What is the expected output of the following code?

  1. 4
  2. 16
  3. an exception is raised
  4. 1

Answer(s): D



What is the expected behavior of the following code?

  1. the code is erroneus and it will not execute
  2. it outputs [2, 4]
  3. it outputs [4, 2]
  4. it outputs [0, 1, 2, 3, 4]

Answer(s): C






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

PCAP-31-03 Discussions & Posts