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

The simplest possible class definition in Python can be expressed as:

A.

class X:

B.

class X:

pass

C.

class X:

return

D.

class X: {}

What is the expected output of the following snippet?

A.

True lower

B.

True upper

C.

False upper

D.

False lower

Which one of the platform module functions should be used to determine the underlying platform name?

A.

platform.uname ()

B.

platform.platform ()

C.

platform.python_version()

D.

platform.processor()

Which line can be used instead of the comment to cause the snippet to produce the following expected output? (Select two answers)

Expected output:

1 2 3

Code:

A.

c, b, a = b, a, c

B.

c, b, a = a, c, b

C.

a, b, c = c, a, b

D.

a, b, c = a, b, c

Files with the suffix .pyc contain:

A.

Python 4 source code

B.

backups

C.

temporary data

D.

semi-compiled Python code

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

A.

11 == '011'

B.

3 * 'a' < 'a' * 2

C.

'abc' .upper () < 'abc'

D.

'1' + '2' * 2 !=2 '12'

The following class hierarchy is given. What is the expected out of the code?

A.

BB

B.

CC

C.

AA

D.

BC

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

A.

open () is a function which returns an int that represents a physical file handle

B.

the second open () argument is optional

C.

instd, outstd, errstd are the names of pre-opened streams

D.

if invoking open () fails, the value None is returned

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

A.

'in not' in 'not'

B.

'in' in 'Thames'

C.

't' . upper ( ) in 'Thames'

D.

'in' in 'in'

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

string = 'SKY' (:: -1)

string = string (-1)

A.

string is None

B.

string (0) == string (-1

C.

string (0) == 'Y'

D.

len (string) == 1