Winter Sale - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

PCAP PCAP-31-03 Book

Page: 5 / 12
Total 154 questions

Certified Associate in Python Programming Questions and Answers

Question 17

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

Options:

A.

obj_b.prop_a == 3

B.

hasattr(obj_b, 'prop_aa')

C.

isinstance(obj_c,A)

D.

B. VarA == 3

Question 18

The following expression

1+-2

is:

Options:

A.

equal to 1

B.

invalid

C.

equal to 2

D.

equal to -1

Question 19

What is the expected behavior of the following code?

It will:

Options:

A.

print 0

B.

cause a runtime exception

C.

prints 3

D.

print an empty line

Question 20

What is the expected output of the following snippet?

Options:

A.

abc

B.

The code will cause a runtime exception

C.

ABC

D.

123

Page: 5 / 12
Total 154 questions