[Q32-Q48] Attested PCAP-31-03 Dumps PDF Resource [2024]

Share

Attested PCAP-31-03 Dumps PDF Resource [2024]

Latest PCAP-31-03 Actual Free Exam Questions Updated 145 Questions

NEW QUESTION # 32
Assuming that the following inheritance set is in force, which of the following classes are declared properly? (Select two answers)

  • A. class Class_2(B,D): pass
  • B. class Class_1(C,D): pass
  • C. class Class_3(A,C): pass
  • D. class Class_4 (D, A) : pass

Answer: B,D


NEW QUESTION # 33
Which of the following lambda definitions are correct? (Select two answers)

  • A. lanbda x, y; return x\\y - x%y
  • B. lambda (x, y = x\\y x%y
  • C. lambda x, y; (x, y)
  • D. lambda x, y; x\\y - x%y

Answer: C,D


NEW QUESTION # 34
With regards to the directory structure below, select the proper forms of the directives in order to import module_a. (Select two answers)

  • A. import module_a
  • B. from pypack import module_a
  • C. import pypack.module_a
  • D. import module_a from pypack

Answer: B,C


NEW QUESTION # 35
Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers) string = 'SKY' (:: -1) string = string (-1)

  • A. string (0) == string (-1
  • B. string is None
  • C. string (0) == 'Y'
  • D. len (string) == 1

Answer: C,D


NEW QUESTION # 36
Select the valid fun () invocations:
(select two answers)
def fun (a, b=0):
return a*b

  • A. fun(b=1)
  • B. fun(b=1, 0)
  • C. fun (1)
  • D. fun (a=0)

Answer: C,D


NEW QUESTION # 37
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)

  • A. From pymod import '
    Pymod.pyfun ( )
  • B. Import pymod
    Pymod. Pyfun ( )
  • C. Import pyfun from pymod
    Pyfun ( )
  • D. From pymod import pyfun
    Pyfun ( )

Answer: B,D


NEW QUESTION # 38
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Select two answers)

  • A. isinstance(obj_c,A)
  • B. obj_b.prop_a == 3
  • C. B.VarA == 3
  • D. hasattr(obj_b, 'prop_aa')

Answer: A,D


NEW QUESTION # 39
A variable stored separately in every object is called:

  • A. a class variable
  • B. an object variable
  • C. there are no such variables, all variables are shared among objects
  • D. an instance variable

Answer: D


NEW QUESTION # 40
What is true about Python class constructors? (Select two answers)

  • A. the constructor cannot use the default values of the parameters
  • B. the constructor's first parameter identifies an object currently being created
  • C. the constructor can be invoked directly under strictly defined circumstances
  • D. super-class constructor is invoked implicitly during constructor execution

Answer: B,C


NEW QUESTION # 41
What is the expected behavior of the following code?

  • A. it outputs False
  • B. it outputs nothing
  • C. it raises an exception
  • D. it outputs True

Answer: D


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

  • A. a is b
  • B. b( ) > 2
  • C. a is not None
  • D. a() > 2

Answer: B,C,D


NEW QUESTION # 43
Which of the following statements are true? (Select two answers)

  • A. Python strings are mutable
  • B. Python strings can be sliced like lists
  • C. Python strings are actually lists
  • D. Python strings can be concatenated

Answer: B,D


NEW QUESTION # 44
How many lines does the following snippet output?

  • A. one
  • B. three
  • C. four
  • D. two

Answer: B


NEW QUESTION # 45
Which of the following invocations are valid? (Select two answers)

  • A. rfind("python","r")
  • B. "python".index("th")
  • C. sorted("python")
  • D. "python".sort ()

Answer: B,C


NEW QUESTION # 46
What is the expected behavior of the following snippet?

It will:

  • A. cause a runtime exception on line 03
  • B. print3
  • C. cause a runtime exception on line 02
  • D. cause a runtime exception on line 01

Answer: B

Explanation:


NEW QUESTION # 47
A property that stores information about a given class's super-classes is named:

  • A. _ancestors_
  • B. _upper_
  • C. _super_
  • D. _bases_

Answer: C


NEW QUESTION # 48
......

PCAP-31-03 Certification Overview Latest PCAP-31-03 PDF Dumps: https://www.pass4leader.com/Python-Institute/PCAP-31-03-exam.html

Free PCAP-31-03 Exam Braindumps certification guide Q&A: https://drive.google.com/open?id=10KoDt0NU6D4Y-dzOiRAlnyqFNdJTtg9R