PCPP-32-101 Exam Questions
88 real PCPP-32-101 exam questions with expert-verified answers and explanations. Page 1 of 2.
- Question #1Advanced OOP
Select the true statement about composition.
compositionhas-a relationshipOOP pillarscode reusability - Question #2Advanced OOP
Analyze the following snippet and select the statement that best describes it.
exception chainingcustom exceptionsexception inheritanceexplicit chaining - Question #3Advanced OOP
Analyze the following snippet and select the statement that best describes it.
instance variablesclass variablesself keyword__init__ - Question #4Advanced OOP
The following snippet represents one of the OOP pillars. Which one is that?
polymorphismOOP pillarsmethod overridingduck typing - Question #5Advanced OOP
Analyze the following function and choose the statement that best describes it.
decoratorsdecorator argumentsdecorator stackinginfinite recursion - Question #6Advanced OOP
Analyze the following snippet and select the statement that best describes it.
*args**kwargsvariable argumentsfunction parameters - Question #7Advanced OOP
Analyze the following snippet and decide whether the code is correct and/or which method should be distinguished as a class method.
@classmethodclass methodsclass variablesdecorators - Question #8Advanced OOP
Analyze the code and choose the best statement that describes it.
dunder methods__ne__operator overloadingspecial methods - Question #9Advanced OOP
Which function or operator should you use to obtain the answer True or False to the question "Do two variables refer to the same object?"
object identityis operatorid() functionreference comparison - Question #10Advanced OOP
Which sentence about the @property decorator is false?
@property decoratorgetter setterencapsulationproperty methods - Question #11Advanced OOP
Select the true statement about the __name__ attribute.
__name__ attributeclass attributesspecial attributes - Question #12Advanced OOP
What is a static method?
static methods@staticmethodclass methodsmethod types - Question #13Advanced OOP
What is true about type in the object-oriented programming sense?
type metaclassclass hierarchyobject modelinheritance - Question #14Working with Files
What does the term deserialization mean? (Choose the best answer.)
deserializationserializationbyte streamspickle - Question #15Advanced OOP
What is a __traceback__? (Choose two.)
__traceback__exception attributestraceback moduleexception handling - Question #16PEP and Best Practices
Which of the following examples using line breaks and different indentation methods are compliant with PEP 8 recommendations? (Choose two.) A. B. C. D.
PEP 8line breaksindentationcode formatting - Question #18PEP and Best Practices
Select the true statement related to PEP 257.
PEP 257docstringsattribute docstringsdocumentation conventions - Question #19PEP and Best Practices
Select the true statements related to PEP 8 programming recommendations for code writing. (Choose two.)
PEP 8isinstancetype comparisontrailing whitespace - Question #20PEP and Best Practices
Select the true statements related to PEP 8 naming conventions. (Choose two.)
PEP 8naming conventionssnake_caseCamelCase - Question #21PEP and Best Practices
Select the true statement about PEP 8 recommendations related to line breaks and binary operators.
PEP 8binary operatorsline breakscode style - Question #22PEP and Best Practices
Look at the following code snippets and decide which ones follow PEP 8 recommendations for whitespaces in expressions and statements. (Choose two.)
PEP 8whitespace rulesexpressionsstatements - Question #23Advanced OOP
Which of the following values can be returned by the messagebox.askquestion() method?
tkintermessageboxdialog return values - Question #24Advanced OOP
What will happen if the main window is too small to fit all its widgets?
tkinterwidget layoutwindow sizingwidget visibility - Question #25Advanced OOP
What is true about the unbind() method? (Choose two.)
tkinterevent bindingunbind methodevent handling - Question #26Advanced OOP
If purple can be obtained from mixing red and blue, which color codes represent the two ingredients? (Choose two.)
hex color codesRGB valuescolor mixingtkinter colors - Question #27Advanced OOP
What is true about the invocation of the cget() method?
tkintercget methodwidget attributeswidget configuration - Question #28Advanced OOP
Which of the following will set the button text's font to 12 point italics Arial? (Choose two.)
tkinterButton widgetfont configurationconfig method - Question #29Advanced OOP
What is true about the unbind_all() method? (Choose two.)
tkinterunbind_allevent bindingwidget methods - Question #30Advanced OOP
If w is a correctly created main application window, which method would you use to fix both of the main window's dimensions?
tkinterwindow dimensionsresizable methodmain window - Question #31Networking
Select the true statements about the connection-oriented and connectionless types of communication. (Choose two.)
TCP/IPconnection-orientedconnectionlessnetwork communication - Question #32Networking
Select the true statements about sockets. (Choose two.)
socketscommunication endpointsIPCnetwork programming - Question #33Networking
Select the true statement about the socket.gaierror exception.
socket exceptionsgaierrorgetaddrinfoerror handling - Question #34Working with Files
Select the true statements about the json.dumps() function. (Choose two.)
JSONjson.dumpsserializationPython data - Question #35Working with Files
What is ElementTree?
ElementTreeXML parsingbuilt-in modulesXML manipulation - Question #36Working with Files
In the JSON processing context, the term serialization:
JSONserializationdeserializationdata conversion - Question #37Networking
Select the true statements about the following invocation: (Choose two.)
socketslocalhostport addressingsocket invocation - Question #38Networking
A socket object is usually created by which one of the following invocations?
socketssocket creationsocket domainsocket type - Question #39Databases
Select the true statements about the sqlite3 module. (Choose two.)
sqlite3Cursor classfetchoneexecute method - Question #40Working with Files
Which of the following constants will be used if you do not define the quoting argument in the writer method provided by the csv module?
csv moduleQUOTE_MINIMALwriter methodquoting constants - Question #41Working with Files
Which one of the following methods allows you to debug an XML tree in the xml.etree.ElementTree module?
ElementTreeXML debuggingdump methodxml.etree - Question #42Databases
Select the true statements about the sqlite3 module. (Choose two.)
sqlite3DB-API 2.0in-memory databasefetchall - Question #43PEP and Best Practices
What is the result of the following code?
debuggingloggingconditional outputcode tracing - Question #44Working with Files
What will be the content of the colors csv file when you run the following code? A. B. C.
CSVfile writingexceptionscsv module - Question #45Working with Files
Which of the following methods allow you to load a configuration using ConfigParser? (Choose two.)
ConfigParserconfiguration filesread methodsINI files - Question #46Advanced OOP
What is explicit exception chaining?
exception chainingexplicit chaining__cause____context__ - Question #47Working with Files
Which of the following types cannot be pickled?
pickleserializationunpicklable typesfunction definitions - Question #48Advanced OOP
What is a method?
methodsclassesOOP fundamentalscallable - Question #49Advanced OOP
Select the true statement about the __dict__ attribute.
__dict__special attributesclass attributesinstance attributes - Question #50Advanced OOP
Which of the following statements regarding the __traceback__ attribute are true? (Choose two.)
__traceback__exception objectstraceback moduleexception chain - Question #51Advanced OOP
When are instance variables created? (Choose the best answer.)
instance variablesinitialization__init__object lifecycle