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: 2 / 2
Total 69 questions

Which of the following types cannot be pickled?

A.

integers, floating-point numbers, complex numbers

B.

function and class definitions

C.

None, booleans

D.

strings, bytes, bytearrays

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

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

A.

my_dict = {

"X": "180.A",

"Y": "206.P",

"Z": "12.C"

}

B.

spam = my_function(arg_one,

arg_two,

arg_three,

arg_four)

C.

foo = my_function

(arg_one, arg_two,

arg_three, arg_four

)

D.

my_dict = { "A" : "1", "B" : "2", "C" : "1" }

Which of the following methods allow you to load a configuration using ConfigParser? (Select two answers.)

A.

read

B.

read_dict

C.

read_conf

D.

read_str

Select the true statement about composition

A.

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

B.

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

C.

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

D.

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

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

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

Which of the following is not a widget property?

A.

width

B.

underline

C.

highlightthickness

D.

depth

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)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Select the true statements about the json.loads() function.

(Select two answers.)

A.

It takes Python data as its argument.

B.

It returns a JSON string.

C.

It takes a JSON string as its argument.

D.

It returns a Python entity.

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