Big Halloween Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

Pass the Python Institute PCAP PCAP-31-03 Questions and answers with CertsForce

Viewing page 4 out of 5 pages
Viewing questions 31-40 out of questions
Questions # 31:

Assuming that the following piece of code has been executed successfully, which of the expressions evaluate to True? (Choose two.)

Question # 31

Options:

A.

isinstance (obj_b,A)


B.

A.VarA == 1


C.

obj_a is obj_aa


D.

B.VarA == 1


Expert Solution
Questions # 32:

With regards to the directory structure below, select the proper forms of the directives in order to import module_c. (Select two answers)

Question # 32

Options:

A.

from pypack.upper.lower import module_c


B.

import pypack.upper.lower.module_c


C.

import upper.module_c


D.

import upper.lower.module_c


Expert Solution
Questions # 33:

What is true about the following snippet? (Select two answers)

Question # 33

Options:

A.

the code will raise an unhandled exception


B.

the string I feel fine 'will be seen


C.

the string it's nice to see you will be seen


D.

the string what a pity will be seen


Expert Solution
Questions # 34:

Which of the following statements are true? (Select two answers)

Options:

A.

Python strings are actually lists


B.

Python strings can be concatenated


C.

Python strings can be sliced like lists


D.

Python strings are mutable


Expert Solution
Questions # 35:

How many lines does the following snippet output?

Question # 35

Options:

A.

three


B.

one


C.

two


D.

four


Expert Solution
Questions # 36:

What is the expected behavior of the following code?

Question # 36

Options:

A.

it outputs 'None'


B.

it outputs 3


C.

it raises an exception


D.

it outputs 0


Expert Solution
Questions # 37:

What is the expected behavior of the following code?

Question # 37

Options:

A.

the code is erroneous and it will not execute


B.

it outputs 'tuple' object does not support item assignment


C.

0it outputs list assignment index out of range


D.

it outputs None


Expert Solution
Questions # 38:

Which of the listed actions can be applied to the following tuple? (Select two answers)

Options:

A.

tup [:]


B.

tup.append (0)


C.

tup [0]


D.

del tup


Expert Solution
Questions # 39:

What is the expected out of the following code of the file named zero_length_existing_file is a zero-length file located inside the working directory?

Question # 39

Options:

A.

0


B.

-1


C.

an errno value corresponding to file not found


D.

2


Expert Solution
Questions # 40:

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

Options:

A.

_upper_


B.

_bases_


C.

_ancestors_


D.

_super_


Expert Solution
Viewing page 4 out of 5 pages
Viewing questions 31-40 out of questions