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 1 out of 2 pages
Viewing questions 1-10 out of questions
Questions # 1:

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

Options:

A.

#FFFFFF


B.

#0000FF


C.

#FF0000


D.

#000000


Expert Solution
Questions # 2:

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

Question # 2

Options:

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 =


Expert Solution
Questions # 3:

What is true about the invocation of the cget () method?

Options:

A.

It can be used to read widget attributes.


B.

It has the same effect as the config () method.


C.

It can be used to set new values to widget attributes.


D.

It can be replaced with a dictionary-like access manner.


Expert Solution
Questions # 4:

Select the true statements related to PEP 8 programming recommendations for exception handling. (Select two answers.)

Options:

A.

When designing exception hierarchies, you should focus on stating that a problem occurred, rather than programmatically trying to answer the question about what actually went wrong.


B.

You should generally use “bare” except: clauses, as they will not catch SystemExit and KeyboardInterrupt exceptions, making it more difficult to interrupt a program using keyboard shortcuts.


C.

You should derive exceptions from the Exception class, rather than from the BaseException class.


D.

You should generally limit the use of a “bare” except: clause and, whenever possible, use specific exceptions instead.


Expert Solution
Questions # 5:

What is true about the unbind_all () method?

(Select two answers.)

Options:

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


Expert Solution
Questions # 6:

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

Options:

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.


Expert Solution
Questions # 7:

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

Question # 7

Options:

A.

self. name is the name of a class variable.


B.

varl is the name of a global variable


C.

Excalibur is the value passed to an instance variable


D.

Weapon is the value passed to an instance variable


Expert Solution
Questions # 8:

Select the true statements about PEP 8 recommendations related to using blank lines. (Select two answers.)

Options:

A.

You should not put any blank lines between groups of imports.


B.

You should surround top-level functions and class definitions with one blank line.


C.

You should surround top-level functions and class definitions with two blank lines.


D.

You should surround method definitions inside classes by a single blank line.


Expert Solution
Questions # 9:

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

Options:

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.


Expert Solution
Questions # 10:

Select the true statement about composition

Options:

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.


Expert Solution
Viewing page 1 out of 2 pages
Viewing questions 1-10 out of questions