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

Exact2Pass Menu

Question # 4

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

Full Access
Question # 5

Select the true statements related to PEP 8 programming recommendations for code writing. (Select two answers:)

A.

You should use the not ... is operator (e.g. if not spam is None:), rather than the is not operator (e.g.if spam is notNone:), to increase readability.

B.

You should make object type comparisons using the ismstanceQ method (e.g. if isinstance (obj, int) :) instead of comparing types directly (eg if type(obj) is type(i)).

C.

You should write code in a way that favors the CPython implementation over PyPy, Cython. and Jython.

D.

You should not write string literals that rely on significant trailing whitespaces as they may be visually indistinguishable, and certain editors may trim them

Full Access
Question # 6

Select the true statements about the json.-dumps () function. (Select two answers.)

A.

It returns a JSON string.

B.

It returns a Python entity.

C.

It takes a JSON string as its argument

D.

It takes Python data as its argument.

Full Access