Practice Free PCPP-32-101 Exam Online Questions
What is true about the unbind() method? (Choose two.)
- A . It is invoked from within the event’s object.
- B . It is invoked from within a widget’s object
- C . It needs a widget’s object as an argument.
- D . It needs the event name as an argument
If w is a correctly created main application window, which method would you use to fix both of the main window’s dimensions?
- A . w.fixshape()
- B . w.fixdim()
- C . w.resizable()
- D . w.makewindow()
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?
- A . csv.QUOTE_MINIMAL
- B . csv.QUOTE_NONE
- C . sv.QUOTE_ALL
- D . csv.QUOTE_NONNUMERIC
What does the term deserialization mean? (Choose the best answer.)
- A . It is a process of creating Python objects based on sequences of bytes
- B . It is a process of assigning unique identifiers to every newly created Python object
- C . It is another name for the data transmission process
- D . It is a process of converting the structure of an object into a stream of bytes
Select the true statements related to PEP 8 naming conventions. (Choose two.)
- A . Function and variable names should be lower-case with words separated by underscores.
- B . You should always use self as the first argument to instance methods, and cls as the first argument to class methods.
- C . Modules should have short names written in CamelCase.
- D . Constants should be written in all lower-case letters with words separated by underscores.
Which of the following values can be returned by the messagebox.askquestion() method?
- A . "accept" and "cancel"
- B . l and 0
- C . "yes" and "no"
- D . True and False
What is explicit exception chaining?
- A . It is another name for a traceback file that shows the hierarchy of exceptions.
- B . It is a situation where an exception is raised during other exception handling – the __context__ attribute being filled with the exception details.
- C . It is a situation where an exception is raised intentionally during other exception handling C the __cause__ attribute is filled with the exception details.
- D . It is a way to preserve all objects involved in exception raising.
Look at the following examples of comments and docstrings in Python Select the ones that are useful and compliant with PEP 8 recommendations. (Choose two.)
A )

B )

C )

D ) price = price + 1 # Decrement price by one to compensate for loss.
- A . Option A
- B . Option B
- C . Option C
- D . Option D
What is socket.timeout?
- A . A one-parameter method that makes it possible to set a timeout on blocking socket operations.
- B . An exception that is raised when the server’s reaction does not occur in time.
- C . A one-parameter function that makes it possible to set the wait time for the client and raise a TimeoutError exception when the response time has passed.
- D . An exception that is raised when a timeout occurs on the interval between the server’s alerts and the client’s response.
Analyze the following snippet and select the statement that best describes it.

- A . The code is an example of implicitly chained exceptions.
- B . The code is erroneous as the OwnMath class does not inherit from any Exception type class
- C . The code is fine and the script execution is not interrupted by any exception.
- D . The code is an example of explicitly chained exceptions
