Free PCAP-31-03 Exam Braindumps
Certified Associate in Python Programming Exam Questions 36–40 (page: 9)

Updated On: 9-Feb-2026

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



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



Viewing page 9 of 30
Viewing questions 41 - 45 out of 147 questions


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

AI Tutor AI Tutor 👋 I’m here to help!