PCPP-32-101 Exam Questions
88 real PCPP-32-101 exam questions with expert-verified answers and explanations. Page 2 of 2.
- Question #52Advanced OOP
What is true about a parameter named cls?
cls parameterclass methodsstatic methods@classmethod - Question #53Advanced OOP
If inheritance can result in MRO inconsistency, should you stop using inheritance altogether and make use of polymorphism instead?
MROmultiple inheritancepolymorphisminheritance design - Question #54Advanced OOP
Which function can be used to get a list of methods inherent to an object?
dir()introspectionobject methodsbuilt-in functions - Question #55Advanced OOP
Analyze the following snippet. Which method should be distinguished as a static method?
static methods@staticmethodmethod analysisOOP design - Question #56Advanced OOP
Which sentence is false?
deep copyshallow copycopy moduleslice operator - Question #57PEP 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 style - Question #58Advanced OOP
Which of the following is not a widget property?
tkinterwidget propertiesGUIhighlightthickness - Question #59Working with Files
If you want to include a UNICODE code point into a JSON string, which prefix will you use?
JSONUnicodeescape sequencesstring encoding - Question #60Networking
What is socket.timeout?
sockettimeoutblocking operationssocket exceptions - Question #61Networking
What HTTP status code is associated with the standard response for a successful HTTP request: OK?
HTTPstatus codesHTTP 200REST - Question #62Networking
Which of the following are the names of HTTP methods? (Choose two.)
HTTP methodsGETPOSTREST - Question #63Working with Files
Select the correct statements about the csv module. (Choose two.)
csv moduleDictReaderDictWriterfile parsing - Question #64PEP and Best Practices
When writing function names according to PEP 8, which style should be used?
PEP 8naming conventionssnake_casefunctions - Question #65PEP and Best Practices
Your team is documenting an API using Python's built-in tools. Which standard should be followed for writing docstrings?
PEP 257docstringsAPI documentationPython standards - Question #66PEP and Best Practices
A junior developer asks for guidance on documenting code using type hints. Which standard should you recommend?
PEP 484type hintstype annotationsdocumentation - Question #67Advanced OOP
You are developing a class where instances need to maintain a unique ID. Which approach would ensure this without duplicating IDs?
class attributesinstance IDsencapsulationobject design - Question #68Advanced OOP
The function named f() is bound as a callback to a widget named w. You have to invoke the callback on demand. How will you do it?
tkinterwidget callbacksinvoke methodevent handling - Question #69Advanced OOP
Select the true statements about invoking a widget's callback manually. (Choose two.)
tkintercallbacksinvoke methodwidget interaction - Question #70Advanced OOP
Which keyword arguments are in use when the grid() manager is invoked? (Choose two.)
tkintergrid managerlayoutcolumnspan - Question #71Advanced OOP
What is true about an event designated as "<ButtonRelease-1>"? (Choose two.)
tkinterevent handlingmouse eventsButtonRelease - Question #72Advanced OOP
The initial value of the StringVar() variable is:
tkinterStringVarvariable typeswidget variables - Question #73PEP and Best Practices
Select the true statements related to PEP 8 programming recommendations for exception handling. (Choose two.)
PEP 8exception handlingbare exceptBaseException - Question #74PEP and Best Practices
Select the true statements related to PEP 8 naming conventions. (Choose two.)
PEP 8naming conventionsmodulesexceptions - Question #75PEP and Best Practices
Select the true statements related to PEP 257. (Choose two.)
PEP 257docstringstriple quotesmodule documentation - Question #76PEP and Best Practices
Select the true statements related to PEP 8 recommendations for string quotes. (Choose two.)
PEP 8string quotessingle quotesdouble quotes - Question #77PEP and Best Practices
Select the true statement about PEP 8 recommendations related to imports.
PEP 8importsmodule structurewildcard imports - Question #78Advanced OOP
The tkinter module is in fact an adapter to the GUI toolkit named:
tkinterTk toolkitGUI frameworkadapter pattern - Question #79Advanced OOP
What is the best description of inheritance in Python?
inheritanceclass extensionOOP conceptssubclassing - Question #80Advanced OOP
Your tkinter application needs to display a list of items for users to select. Which widget should you use?
tkinterListbox widgetGUI componentsuser selection - Question #81Working with Files
Which method is used to open a file for both reading and writing in text mode?
file modesopen functionr+ moderead write - Question #82Databases
You need to fetch all records from a database using sqlite3. Which method should you use after executing the query?
sqlite3fetchallcursor methodsquery results - Question #83Advanced OOP
A user reported that button clicks in your application are not triggering any action. What is the most likely cause?
event callbacksGUI event loopcommand bindingtkinter - Question #84PEP and Best Practices
Your project includes extensive internal APIs. Which standard ensures proper documentation practices for public methods?
PEP 257docstringsdocumentation standardspublic API - Question #86Working with Files
Select the true statements about XML modules in the Python standard library. (Choose two.)
xml.saxSAX parserDOMxml.etree.ElementTree - Question #87Databases
What is the result of the following code assuming that the SELECT query returns three records?
sqlite3fetchallcursorempty result set - Question #88PEP and Best Practices
Select a log that matches the following format: '%(name)s[%(levelname)s][%(asctime)s]:%(message)s'
logginglog format stringasctimelevelname - Question #89Databases
Select the true statements about the sqlite3 module. (Choose two.)
sqlite3in-memory databasecross-platformdatabase storage - Question #90Networking
What is the result of the following code?
socketlocalhostIP address resolutionDNS lookup