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

Python Institute PCPP-32-101 - PCPP1 – Certified Professional in Python Programming 1

Page: 1 / 2
Total 69 questions

Analyze the code and choose the best statement that describes it.

A.

___ne___() is not a built-in special method

B.

The code is erroneous

C.

The code is responsible for the support of the negation operator e.g. a = - a.

D.

The code is responsible for the support of the inequality operator i.e. i =

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.

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

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

Select the true statements related to PEP 257. (Select two answers.)

A.

The closing quotes of a one-line docstring should be put on a separate line.

B.

A docstring is a string literal that occurs anywhere in Python code, and is used to document Python functions, classes, and public methods.

C.

A docstring is a string literal that occurs as the first statement in a Python module, function, class, or method, and is used to document them.

D.

There are two types of docstrings in Python: one-line and multi-line docstrings.

A property of the event object called widget is in fact:

A.

the reference to an object that stores a widget causing an event.

B.

the name of an object of a widget causing an event.

C.

the run() function.

D.

the name of a widget causing an event.

Analyze the following snippet and decide whether the code is correct and/or which method should be distinguished as a class method.

A.

There is only one initializer, so there is no need for a class method.

B.

The getNumberofCrosswords () method should be decorated With @classmethod.

C.

The code is erroneous.

D.

The gexNumberOfcrosswords () and issrived methods should be decorated with @classzoechod.

Select the correct statements about the csv module.

(Select two answers.)

A.

The DictReader method always gets the header from the first line in the file.

B.

A reader object maps each row to a list of strings.

C.

It is possible to create a DictWriter object without specifying a header.

D.

A DictReader object maps each row to a dict.

What is a static method?

A.

A method that works on the class itself

B.

A method decorated with the @method trait

C.

A method that requires no parameters referring to the class itself

D.

A method that works on class objects that are instantiated

What is true about a parameter named cls?

A.

It is usually used as a reference to a class instance.

B.

It is usually used as the first parameter of a static method.

C.

It is usually used as the first parameter of a class method.

D.

It is the name of a module that delivers an abstract method decorator.