Skip to main content

PCPP-32-101 Real Exam Questions

PCPP - Certified Professional in Python Programming 1

45 questions available · Page 1 of 5

Updated Exam DumpsVerified AnswersPass Guarantee

Get Complete Exam Dumps
Question 1 Multiple choice

Select the true statements about the sqlite3 module. (Select two answers.)

  1. A

    The fetchalt method returns None when no rows are available

  2. B

    The execute method allows you to perform several queries at once

  3. C

    The execute method is provided by the Cursor class

  4. D

    The fetchone method returns None when no rows are available

Show answer and explanation

Correct answers: C, D

Question 2 Single choice

Select the true statement about the___name___attribute.

  1. A

    ___name___is a special attribute, which is inherent for both classes and instances, and it contains information about the class to which a class instance belongs.

  2. B

    ___name is a special attribute, which is inherent for both classes and instances, and it contains a dictionary of object attributes.

  3. C

    __name___is a special attribute, which is inherent for classes and it contains information about the class to which a class instance belongs.

  4. D

    __name___is a special attribute, which is inherent for classes, and it contains the name of a class.

Show answer and explanation

Correct answer: D

Question 3 Multiple choice

What isa___traceback___? (Select two answers )

  1. A

    An attribute owned by every exception object

  2. B

    A special method delivered by the traceback module to retrieve a full list of strings describing thetraceback

  3. C

    An attribute that is added to every object when the traceback module is imported

  4. D

    An attribute that holds interesting information that is particularly useful when the programmer wants to store exception details in other objects

Show answer and explanation

Correct answers: A, D

Question 4 Single choice

Analyze the following snippet and select the statement that best describes it.

  1. A

    The code is an example of implicitly chained exceptions.

  2. B

    The code is erroneous as the OwnMath class does not inherit from any Exception type class

  3. C

    The code is fine and the script execution is not interrupted by any exception.

  4. D

    The code is an example of explicitly chained exceptions.

Show answer and explanation

Correct answer: D

Question 5 Multiple choice

Which of the following examples using line breaks and different indentation methods are compliant with PEP 8 recommendations? (Select two answers.)

  1. A

    Option A

  2. B

    Option B

  3. C

    Option C

  4. D

    Option D

Show answer and explanation

Correct answers: B, D

Question 6 Single choice

What does the term deserialization mean? Select the best answer.

  1. A

    It is a process of creating Python objects based on sequences of bytes.

  2. B

    It is a process of assigning unique identifiers to every newly created Python object

  3. C

    It is another name for the data transmission process

  4. D

    It is a process of converting the structure of an object into a stream of bytes

Show answer and explanation

Correct answer: A

Question 7 Single choice

Select the true statement about composition

  1. A

    Composition extends a class's capabilities by adding new components and modifying the existing ones.

  2. B

    Composition allows a class to be projected as a container of different classes

  3. C

    Composition is a concept that promotes code reusability while inheritance promotes encapsulation.

  4. D

    Composition is based on the has a relation: so it cannot be used together with inheritance.

Show answer and explanation

Correct answer: B

Question 8 Single choice

Analyze the following function and choose the statement that best describes it.

  1. A

    It is an example of a decorator that accepts its own arguments.

  2. B

    It is an example of decorator stacking.

  3. C

    It is an example of a decorator that can trigger an infinite recursion.

  4. D

    The function is erroneous.

Show answer and explanation

Correct answer: A

Question 9 Multiple choice

Select the true statements about the json.-dumps () function. (Select two answers.)

  1. A

    It returns a JSON string.

  2. B

    It returns a Python entity.

  3. C

    It takes a JSON string as its argument

  4. D

    It takes Python data as its argument.

Show answer and explanation

Correct answers: A, D

Question 10 Single choice

What is true about the invocation of the cget () method?

  1. A

    It can be used to read widget attributes.

  2. B

    It has the same effect as the config () method.

  3. C

    It can be used to set new values to widget attributes.

  4. D

    It can be replaced with a dictionary-like access manner.

Show answer and explanation

Correct answer: A