Python Institute PCPP-32-101 - Certified Professional in Python Programming 1 Exam
Page: 1 / 16
Total 80 questions
Question #1 (Topic: Exam A)
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
Answer: B
Question #2 (Topic: Exam A)
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
Answer: B
Question #3 (Topic: Exam A)
Analyze the following snippet and select the statement that best describes it.

A. self.name is the name of a class variable
B. var1 is the name of a global variable
C. Excalibur is the value passed to an instance variable
D. weapon is the value passed to an instance variable
Answer: C
Question #4 (Topic: Exam A)
The following snippet represents one of the OOP pillars. Which one is that?

A. Serialization
B. Inheritance
C. Encapsulation
D. Polymorphism
Answer: D
Question #5 (Topic: Exam A)
Analyze the following function and choose the statement that best describes it.

A. It is an example of a decorator that accepts its own arguments.
B. It is an example of decorator stacking.
C. It is an example of a decorator that can trigger an infinite recursion
D. The function is erroneous.
Answer: D