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

Page 10 of 37

Which of the following lambda function definitions are correct? (Select two answers)

  1. lambda X : None
  2. lambda : 3,1415
  3. lambda x : def fun(x): return x
  4. lambda lambda: lambda * lambda

Answer(s): A,B



What is the expected output of the following code if existing_file is the name of a file located inside the working directory?

  1. 1 2
  2. 1 2 3
  3. 1 3
  4. 2 3

Answer(s): C



What is the expected out of the following code of the file named zero_length_existing_file is a zero- length file located inside the working directory?

  1. 0
  2. -1
  3. an errno value corresponding to file not found
  4. 2

Answer(s): A



A Python module named pymod, py contains a function named pyfun ( ).
Which of the following snippets will let you invoke the function? (Select two answers)

  1. From pymod import `
    Pymod.pyfun ( )
  2. Import pymod
    Pymod. Pyfun ( )
  3. Import pyfun from pymod
    Pyfun ( )
  4. From pymod import pyfun
    Pyfun ( )

Answer(s): B,D






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

PCAP-31-03 Discussions & Posts