What is true about Object-Oriented Programming in Python? (Select two answers)
A. encapsulation allows you to protect some data from uncontrolled access
B. the arrows on a class diagram are always directed from a superclass towards its subclass
C. inheritance is the relation between a superclass and a subclass
D. an object is a recipe for a class
What is the expected behavior of the following code?
A. it outputs -2
B. it outputs 2. 0
C. it outputs 0. 0
D. the code is erroneous and it will not execute
Which of the following invocations are valid? (Select two answers)
A. rfind("python","r")
B. sorted("python")
C. "python".sort ()
D. "python".index("th")
Which of the listed actions can be applied to the following tuple? (Select two answers)
A. tup [:]
B. tup.append (0)
C. tup [0]
D. del tup
The following class hierarchy is given. What is the expected out of the code?
A. BB
B. CC
C. AA
D. BC
Which of the following statements are true? (Select two answers)
A. Python strings are actually lists
B. Python strings can be concatenated
C. Python strings can be sliced like lists
D. Python strings are mutable
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 pypack.module_a
B. import module_a from pypack
C. import module_a
D. from pypack import module_a
What is the expected behavior of the following code?
A. It outputs 123
B. it raises an exception
C. it outputs 321
D. it outputs 6
Which of the following sentences are true? (Select two answers)
A. lists may not be stored inside tuples
B. tuples may be stored inside lists
C. tuples may not be stored inside tuples
D. lists may be stored inside lists
How many elements will the list1 list contain after execution of the following snippet?
A. two
B. zero
C. one
D. three
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-31-03 exam preparations and Python Institute certification application, do not hesitate to visit our Vcedump.com to find your solutions here.