Exit demo PCPP-32-101 PCPP - Certified Professional in Python Programming 1 PDF format · free preview

Python Institute PCPP-32-101 - Questions & Answers

Free preview · every answer includes a full explanation

Product page: https://prepkeys.com/pcpp-32-101.html

Question 1
Single choice

Select the true statement related to PEP 257.

A.

String literals that occur immediately after another docstring are called attribute docstrings.

B.

Attribute docstrings and Additional docstrings are two types of extra docstrings that can be extracted by software tools.

C.

String Iiterals that occur in places other than the first statement in a module, function, or class definition can act as documentation.
They are recognized by the Python bytecode compiler and are accessible as runtime object attributes

D.

String literals that occur immediately after a simple assignment at the top level of a module are called complementary docstrings

Question 2
Multiple choice

What is true about the unbind () method? (Select two answers.)

A.

It is invoked from within the events 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

Question 3
Single choice

What is ElementTree?

A.

A Python built-in module that contains functions used for creating HTML files.

B.

A Python library that contains an API used for parsing and manipulating JSON files.

C.

A Python library that contains functions and tools used for manipulating text files in GUI Programming.

D.

A Python built-in module that contains functions used for parsing and creating XML data.

Question 4
Single choice

In the JSON processing context, the term serialization:

A.

names a process in which Python data is turned into a JSON string.

B.

names a process in which a JSON string is turned into Python data.

C.

refers to nothing, because there is no such thing as JSON serialization.

D.

names a process in which a JSON string is remodeled and transformed into a new JSON string

Question 5
Multiple choice

If purple can be obtained from mixing red and blue, which color codes represent the two ingredients?
Select two answers)

A.

#FFFFFF

B.

#0000FF

C.

#FF0000

D.

#000000

Question 6
Multiple choice

Select the true statements related to PEP 8 programming recommendations for code writing. (Select two answers:)

A.

You should use the not ... is operator (e.g. if not spam is None:), rather than the is not operator (e.g.if spam is notNone:), to increase readability.

B.

You should make object type comparisons using the ismstanceQ method (e.g. if isinstance (obj, int) :) instead of comparing types directly (eg if type(obj) is type(i)).

C.

You should write code in a way that favors the CPython implementation over PyPy, Cython. and Jython.

D.

You should not write string literals that rely on significant trailing whitespaces as they may be visually indistinguishable, and certain editors may trim them

Question 7
Multiple choice

Look at the following code snippets and decide which ones follow PEP 8 recommendations for whitespacesin expressions and statements(Select two answers.)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 8
Multiple choice

What is true about the unbind_all () method? (Select two answers.)

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

Question 9
Multiple choice

What isa___traceback___? (Select two answers )

A.

An attribute owned by every exception object

B.

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

C.

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

D.

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

Question 10
Multiple choice

Select the true statements about the connection-oriented and connectionless types of communication. (Select two answers.)

A.

In the context of TCP/IP networks, the communication side that initiates a connection is called the client, whereas the side that answers the client is called the server

B.

Connectionless communications are usually built on top of TCP

C.

Using walkie-talkies is an example of a connection-oriented communication

D.

A phone call is an example of a connection-oriented communication

Showing 10 of 45 questions · Unlock the full set