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

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



Page 10 of 37



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

Mohammed commented on November 15, 2024
After checking these questions and reviewing all the answers and Explanations I realized that I would not have been able to pass the exam based on my current knowledge. This is completely changed my approach in how I am going to prepare now.
UNITED STATES
upvote

Nigel commented on September 27, 2024
Managed to pass my exam bu using the full version of this exam. This free version has less questions compared to PDF.
Spain
upvote

Idris Abraham Idilli commented on September 23, 2024
Very interesting
Anonymous
upvote