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

What is the expected behavior of the following code?

A.

Its outputs 321

B.

It raises an exception.

C.

It outputs 6.

D.

It outputs 123.

What is the expected behavior of the following code?

A.

It outputs 2

B.

It outputs 0.

C.

It outputs 1.

D.

It raises an exception

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

A.

\e is an escape sequence used to mark the end of lines

B.

ASCII is synonymous with UTF-8

C.

II in ASCII stands for Information Interchange

D.

a code point is a number assigned to a given character

What is the expected behavior of the following code?

A.

it outputs 1

B.

it outputs 0

C.

it raises an exception

D.

it outputs 2

What is the expected behavior of the following code?

A.

it outputs [1, 3]

B.

the code is erroneous and it will not execute

C.

it outputs [3, 1]

D.

it outputs [4, 2, 0]

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

A.

obj_b.prop_a == 3

B.

hasattr(obj_b, 'prop_aa')

C.

isinstance(obj_c,A)

D.

B. VarA == 3

Which of the following expressions evaluate to True? (Select two answers)

A.

121 +1 == int ('1' + 2 * '2')

B.

float ('3.14') == str('3.'+'14')

C.

'xyz'.lower() 'XY'

D.

'8' + '8' !=2 * '8'

What is true about Object-Oriented Programming in Python? (Select two answers)

A.

if a real-life object can be described with a set of adjectives, they may reflect a Python object method

B.

the same class can be used many times to build a number of objects

C.

each object of the same class can have a different set of methods

D.

a subclass is usually more specialized than its superclass

What is the expected output of the following snippet?

A.

3

B.

1

C.

2

D.

the code is erroneous

What will the value of the i variable be when the following loop finishes its execution?

A.

10

B.

the variable becomes unavailable

C.

11

D.

9