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

PCAP-31-03 Exam Dumps - Certified Associate in Python Programming

Go to page:
Question # 41

What would you use instead of XXX if you want to check whether a certain ‘ key' exists in a dictionary called diet? (Select two answers)

II

if XXX:

print("Key exists")

A.

'key' in diet

B.

diet['key'] != None

C.

diet.exists('key')

D.

'key' in diet.keys()

Full Access
Question # 42

Assuming that the following code has been executed successfully, select the expressions which evaluate to True (Select two answers.)

A.

a is not None

B.

a ! =b

C.

b () ==4

D.

a () == 4

Full Access
Question # 43

What is the expected output of the following code if there is no file named non existing_file inside the working directory?

A.

2 2

B.

1 3

C.

1 2 3

D.

2 2 3

Full Access
Question # 44

A property that stores information about a given class's super-classes is named:

A.

_upper_

B.

_bases_

C.

_ancestors_

D.

_super_

Full Access
Question # 45

Assuming that the following code has been executed successfully, select the expressions which evaluate to true.

(Select two answers.)

A.

a == b

B.

b {1} == 4

C.

a is not None

D.

a (2) == 4

Full Access
Question # 46

What is true about Python packages? (Select two answers)

A.

the sys.path variable is a list of strings

B.

_pycache_is a folder that stores semi-completed Python modules

C.

a package contents can be stored and distributed as an mp3 file

D.

a code designed to initialize a package's state should be placed inside a file named init.py

Full Access
Go to page: