PCPP-32-101 practice questions, page 3 of 4, with answer review and explanations.
Question 11
Select the true statement about the __name__ attribute.
__name__ is a special attribute, which is inherent for both classes and instances, and it contains information about the class to which a class instance belongs.
__name__ is a special attribute, which is inherent for both classes and instances, and it contains a dictionary of object attributes.
__name__ is a special attribute, which is inherent for classes, and it contains information about the class to which a class instance belongs.
__name__ is a special attribute, which is inherent for classes, and it contains the name of a class.
Question 12
What is a static method?
A method that works on the class itself
A method decorated with the @method trait
A method that requires no parameters referring to the class itself
A method that works on class objects that are instantiated
Question 13
What is true about type in the object-oriented programming sense?
It is the bottommost type that any object can inherit from.
It is a built-in method that allows enumeration of composite objects
It is the topmost type that any class can inherit from.
It is an object used to instantiate a class.
Question 14
What does the term deserialization mean? (Choose the best answer.)
It is a process of creating Python objects based on sequences of bytes
It is a process of assigning unique identifiers to every newly created Python object
It is another name for the data transmission process
It is a process of converting the structure of an object into a stream of bytes
Question 15
What is a __traceback__? (Choose two.)
An attribute owned by every exception object
A special method delivered by the traceback module to retrieve a full list of strings describing the traceback
An attribute that is added to every object when the traceback module is imported
An attribute that holds interesting information that is particularly useful when the programmer wants to store exception details in other objects