Practice Free PCPP-32-101 Exam Online Questions
Question #1
Select the true statement about composition.
- A . Composition extends a class’s capabilities by adding new components and modifying the existing ones
- B . Composition allows a class to be projected as a container of different classes
- C . Composition is a concept that promotes code reusability, while Inheritance promotes encapsulation
- D . Composition is based on the has a relation, so it cannot be used together with inheritance
Correct Answer: B
Question #2
What is a DTD?
- A . A meta-document describing the structure of an XML document.
- B . One of the possible types of an XML document.
- C . A synonym for an XML document that uses SGML instead of XML
- D . Part of an XML document.
Correct Answer: A
Question #3
Which of the following types cannot be pickled?
- A . None, booleans
- B . strings, bytes, bytearrays
- C . integers, floating-point numbers, complex numbers
- D . function and class definitions
Correct Answer: D
Question #4
What is true about the invocation of the cget() method?
- A . It can be used to read widget attributes
- B . It has the same effect as the config() method
- C . It can be used to set new values to widget attributes
- D . It can be replaced with a dictionary-like access manner
Correct Answer: A
Question #5
Which of the following examples using line breaks and different indentation methods are compliant with PEP 8 recommendations? (Choose two.)
A )

B )

C )

D )

- A . Option A
- B . Option B
- C . Option C
- D . Option D
Correct Answer: BD
Question #6
What is a static method?
- A . A method that works on the class itself
- B . A method decorated with the @method trait
- C . A method that requires no parameters referring to the class itself Most Voted
- D . A method that works on class objects that are instantiated
Correct Answer: C
Question #7
A socket object is usually created by which one of the following invocations?
- A . socket.socket(socket_domain, socket_type)
- B . socket = socket.socket(socket_number)
- C . socket = socket.socket(socket_domain, socket_type, server_address)
- D . socket = socket.socket(server_address)
Correct Answer: A
Question #8
What is true about the unbind _all() method? (Choose two.)
- A . It can be invoked from any widget
- B . It can be invoked from the main window widget only
- C . It is parameterless
- D . It causes all the widgets to disappear
Correct Answer: AC
Question #9
Select the true statements related to PEP 8 naming conventions. (Choose two.)
- A . Class names should use the mixedCase naming style.
- B . Exception names should follow the function naming conventions.
- C . Modules should have short names entirely in lower-case.
- D . You should never use the characters "I" (lower-case letter "el") and "O" (upper-case letter "oh") as single character variable names.
Correct Answer: CD
Question #10
Look at the following code snippets and decide which ones follow PEP 8 recommendations for whitespaces in expressions and statements. (Choose two.)
- A . No whitespace immediately before the opening parenthesis that starts the list of arguments of a function call:

- B . A whitespace immediately before a comma, semicolon, and colon:

- C . No whitespace between a trailing comma and a following closing parenthesis:

- D . A whitespace immediately after the opening parenthesis that starts indexing or slicing:

Correct Answer: AC
