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

Exact2Pass Menu

PCPP1 – Certified Professional in Python Programming 1

Last Update 10 hours ago Total Questions : 69

The PCPP1 – Certified Professional in Python Programming 1 content is now fully updated, with all current exam questions added 10 hours ago. Deciding to include PCPP-32-101 practice exam questions in your study plan goes far beyond basic test preparation.

You'll find that our PCPP-32-101 exam questions frequently feature detailed scenarios and practical problem-solving exercises that directly mirror industry challenges. Engaging with these PCPP-32-101 sample sets allows you to effectively manage your time and pace yourself, giving you the ability to finish any PCPP1 – Certified Professional in Python Programming 1 practice test comfortably within the allotted time.

Question # 1

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

Question # 2

Select a log that matches the following format:

'%(name)s[%(levelname)s][%(asctime)s] :%(message)s'

A.

root[CRITICAL][2019-10-19 18:21:35] :Invalid argument

B.

root:CRITICAL:2019-10-19 18:21:35,407:Invalid argument

C.

root[CRITICAL][2019-10-19 18:21:35,407] :Invalid argument

D.

root:CRITICAL:2019-10-19 18:21:35:Invalid argument

Question # 3

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.

Question # 4

Select the true statements about the following invocation:

(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.

Question # 5

What will be the content of the co/ors.csv file when you run the following code?

A)

B)

C)

D)

An exception will be raised.

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question # 6

Which sentence about the ©property decorator is false?

A.

The ©property decorator should be defined after the method that is responsible for setting an encapsulated attribute.

B.

The @property decorator designates a method which is responsible for returning an attribute value

C.

The ©property decorator marks the method whose name will be used as the name of the instance attribute

D.

The ©property decorator should be defined before the methods that are responsible for setting and deleting an encapsulated attribute

Question # 7

Which function or operator should you use to obtain the answer True or False to the question: "Do two variables refer to the same object?"

A.

The = operator

B.

The isinstanceO function

C.

The id () function

D.

The is operator

Question # 8

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

A.

The sqlite3 module provides an interface compliant with the DB-API 2.0.

B.

The special name memory is used to create a database in RAM.

C.

The sqhte3 module does not support transactions.

D.

The fetchall method returns an empty list when no rows are available

Question # 9

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())

A.

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

B.

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

C.

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

D.

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

Question # 10

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

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.

Go to page: