Summer Sale - Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70dumps

PCPP-32-101 Questions and Answers

Question # 6

Select the true statements about sockets. (Select two answers)

A.

A socket is a connection point that enables a two-way communication between programs running in a network.

B.

A socket is always the secure means by which computers on a network can safely communicate, without the risk of exposure to an attack

C.

A socket is a connection point that enables a one-way communication only between remote processes

D.

A socket can be used to establish a communication endpoint for processes running on the same or different machines.

Full Access
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)

Full Access
Question # 8

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

Question # 8

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.

Full Access
Question # 9

Which of the following statements regarding the __traceback__ attribute are true?

(Select two answers.)

A.

The attribute is a special method delivered by the traceback module to retrieve a full list of strings describing the traceback.

B.

The attribute can be easily handled by the traceback.format_tb() method.

C.

The attribute is owned by every exception object.

D.

The attribute is owned only by the exception objects residing in an exception chain.

Full Access
Question # 10

Look at the following examples of comments and docstrings in Python Select the ones that are useful and compliant with PEP 8 recommendations (Select the two best answers.)

A)

Question # 10

B)

Question # 10

C)

Question # 10

D)

Question # 10

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 11

If w is a correctly created main application window, which method would you use to foe both of the main window's dimensions?

A.

w. f ixshape ()

B.

w. f ixdim ()

C.

w. resizable ()

D.

w.makewindow ()

Full Access
Question # 12

What is wrong with the following snippet?

class A:

def run(self):

print("A is running")

class B(A):

def run(self):

print("B is running")

class C(A, B):

def fly(self):

print("C is flying")

c = C()

A.

There is no run() method defined for the C class.

B.

It causes MRO inconsistency.

C.

Nothing. The code is fine.

D.

There are no __init__() methods — each class should implement this method.

Full Access
Question # 13

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

Question # 13

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.

Full Access
Question # 14

Which one of the following methods allows you to debug an XML tree in the xml.etree ELementTree module?

A.

debug

B.

dump

C.

log

D.

parse

Full Access
Question # 15

What is true about type in the object-oriented programming sense?

A.

It is the bottommost type that any object can inherit from.

B.

It is a built-in method that allows enumeration of composite objects

C.

It is the topmost type that any class can inherit from

D.

It is an object used to instantiate a class

Full Access
Question # 16

Select the true statement about PEP 8 recommendations related to line breaks and binary operators.

A.

It is recommended that you use line breaks before binary operators to improve code readability.

B.

It is permissible to use line breaks before or after a binary operator as long as the convention is consistent locally However, for new code it is recommended that break lines should be used only after binary operators.

C.

It is recommended that you use line breaks after binary operators to improve code readability.

D.

There is no specific PEP 8 recommendation related to using line breaks with binary operators.

Full Access
Question # 17

Which of the following is not a widget property?

A.

width

B.

underline

C.

highlightthickness

D.

depth

Full Access
Question # 18

Select the true statements about the following invocation:

Question # 18

(Select two answers.)

A.

It addresses a service deployed at localhost (the host where the code is run).

B.

It addresses a service whose timeout is set to 3000 ms.

C.

It addresses a service located at the following address local.host.com.

D.

It addresses a service listening at port 3000.

Full Access
Question # 19

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

Question # 19

A.

The code is syntactically correct despite the fact that the names of the function parameters do not follow the naming convention

B.

The *arg parameter holds a list of unnamed parameters

C.

The code is missing a placeholder for unnamed parameters.

D.

The code is syntactically incorrect - the function should be defined as def f1 (*args, **kwargs) :

Full Access
Question # 20

Look at the following examples of comments and docstrings in Python. Select the ones that are useful and compliant with PEP 8 recommendations. (Select the two best answers.)

A.

def net_expense(q, price):

"""Return the total cost of items before tax."""

return q * price

B.

n = n - 1 # Decrement n by 1.

C.

val = val + 1.15 # Compensate for diminished value.

D.

def total_cost(q):

'''Takes the q argument and multiplies it by 1.15.'''

return q * 1.15

Full Access