Summer Certification Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: force70

Pass the Python Institute PCPP1 PCPP-32-101 Questions and answers with CertsForce

Viewing page 2 out of 2 pages
Viewing questions 11-20 out of questions
Questions # 11:

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

Options:

A.

It returns a JSON string.


B.

It returns a Python entity.


C.

It takes a JSON string as its argument


D.

It takes Python data as its argument.


Expert Solution
Questions # 12:

Select the true statement about the___name___attribute.

Options:

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.


B.

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


C.

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

belongs.


D.

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


Expert Solution
Questions # 13:

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

Options:

A.

The fetchalt method returns None when no rows are available


B.

The execute method allows you to perform several queries at once


C.

The execute method is provided by the Cursor class


D.

The fetchone method returns None when no rows are available


Expert Solution
Questions # 14:

Select the true statement about the socket. gaierror exception.

Options:

A.

It is raised when a timeout occurs on a socket.


B.

It is raised when a system function returns a system-related error.


C.

It is raised when an address-related error caused by the repr () function occurs.


D.

It is raised when an address-related error caused by the getaddrinfo () and getnameinfo () functions occurs.


Expert Solution
Questions # 15:

Which of the following constants will be used if you do riot define the quoting argument in the writer method provided by the csv module?

Options:

A.

csv.QUOTE_MINIMAL


B.

csv.QUOTE_NONE


C.

svQUOTE_ALL


D.

csv.QUOTE_NONNUMERIC


Expert Solution
Questions # 16:

Select the true statements related to PEP 8 naming conventions. (Select two answers.)

Options:

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 “l” (lower-case letter “el”) and “O” (upper-case letter “oh”) as single character variable names.


Expert Solution
Questions # 17:

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

Options:

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


Expert Solution
Questions # 18:

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

class Sword:

var1 = 'weapon'

def __init__(self):

self.name = 'Excalibur'

s1 = Sword()

Options:

A.

The snippet will cause an AttributeError exception.


B.

The snippet will cause a ValueError exception.


C.

The class variable value can be updated with the following code: cls.var1


D.

The class variable value can be updated with the following code: Sword.var1


Expert Solution
Questions # 19:

Which sentence about the ©property decorator is false?

Options:

A.

The ©property decorator should be defined after the method that is responsible for setting an encapsulated attribute.


B.

The @property decorator designates a method which is responsible for returning an attribute value


C.

The ©property decorator marks the method whose name will be used as the name of the instance attribute


D.

The ©property decorator should be defined before the methods that are responsible for setting and deleting an encapsulated attribute


Expert Solution
Questions # 20:

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

Options:

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


Expert Solution
Viewing page 2 out of 2 pages
Viewing questions 11-20 out of questions