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

Selected PCPP-32-101 PCPP1 Questions Answers

Page: 3 / 5
Total 69 questions

PCPP1 – Certified Professional in Python Programming 1 Questions and Answers

Question 9

Look at the following code snippets and decide which ones follow PEP 8 recommendations for whitespaces in expressions and statements (Select two answers.)

A)

No whitespace immediately before the opening parenthesis that starts the list of arguments of a function call:

B)

A whitespace immediately before a comma, semicolon, and colon:

C)

No whitespace between a trailing comma and a following closing parenthesis:

D)

A whitespace immediately after the opening parenthesis that starts indexing or slicing:

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 10

What is the result of the following code?

import configparser

config = configparser.ConfigParser()

config['DEFAULT'] = {}

config['mysql'] = {}

config['postgresql'] = {}

config['redis'] = config['postgresql']

print(config.sections())

Options:

A.

['DEFAULT', 'mysql', 'postgresql', 'redis']

B.

['mysql', 'postgresql', 'redis']

C.

['DEFAULT', 'mysql', 'postgresql', 'postgresql']

D.

['mysql', 'postgresql', 'postgresql']

Question 11

The following snippet represents one of the OOP pillars Which one is that?

Options:

A.

Serialization

B.

Inheritance

C.

Encapsulation

D.

Polymorphism

Question 12

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

Page: 3 / 5
Total 69 questions