What is true about Python class constructors? (Choose two.)
A. there can be more than one constructor in a Python class
B. the constructor must return a value other than None
C. the constructor is a method named __init__
D. the constructor must have at least one parameter
Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Choose two.)
A. isinstance (obj_b,A)
B. A.VarA == 1
C. obj_a is obj_aa
D. B.VarA == 1
What is true about Object-Oriented Programming in Python? (Choose two.)
A. each object of the same class can have a different set of methods
B. a subclass is usually more specialized than its superclass
C. if a real-life object can be described with a set of adjectives, they may reflect a Python object method
D. the same class can be used many times to build a number of objects
What is the expected behavior of the following code?
A. it outputs 1
B. it outputs 3
C. it outputs 6
D. it raises an exception
What is the expected behavior of the following code?
A. it outputs 0
B. it raises an exception
C. it outputs 1
D. it outputs 2
What is the expected output of the following snippet?
A. True upper
B. True lower
C. False upper
D. False lower
Assuming that the code below has been placed inside a file named code.py and executed successfully, which of the following expressions evaluate to True? (Choose two.)
A. len(ClassB.__bases__) ==2
B. ClassA.__module__ == ‘__main__’
C. __name__ == ‘code.py’
D. str(Object) == ‘Object’
What is the expected behavior of the following code?
A. it outputs 0
B. it outputs 1
C. it raises an exception
D. it outputs 2
Assuming that the following inheritance set is in force, which of the following classes are declared properly? (Choose two.)
A. class Class_4(D,A): pass
B. class Class_3(A,C): pass
C. class Class_2(B,D): pass
D. class Class_1(C,D): pass
Assuming that the snippet below has been executed successfully, which of the following expressions
evaluate to True? (Choose two.)
string = ‘python’[::2]
string = string[-1] + string[-2]
A. string[0] == ‘o’
B. string is None
C. len(string) == 3
D. string[0] == string [-1]
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Python Institute exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your PCAP exam preparations and Python Institute certification application, do not hesitate to visit our Vcedump.com to find your solutions here.