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

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

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

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

A.

closing an open file is performed by the closefile ( ) function

B.

the second open ( ) argument describes the open mode and defaults to ‘w’

C.

if open ( ) ‘s second argument is ‘r’ the file must exist or open will fail

D.

if open ( )’s second argument is ‘w’ and the invocation succeeds, the previous file’s content is lost

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()

What is the expected behavior of the following code?

It will

A.

print 2 1

B.

print 1 2

C.

cause a runtime exception

D.

print

What is the expected output of the following snippet?

A.

True lower

B.

True upper

C.

False upper

D.

False lower

What is the output of the following piece of code?

A.

ant'bat'camel

B.

ant"bat"camel

C.

antbatcamel

D.

ant bat camel

What is the expected behavior of the following code?

x = 8 ** (1/3)

y = 2. if x < 2.3 else 3.

print(y)

A.

it outputs 2.0

B.

it outputs 2. 5

C.

the code is erroneus and it will not execute

D.

it outputs 3.0

What is the expected behavior of the following code?

A.

It outputs False

B.

It outputs nothing

C.

It outputs True

D.

It raises an exception

What is the expected behavior of the following code?

A.

it outputs 0

B.

it outputs 1

C.

it raises an exception

D.

it outputs 2

What is true about the __based__attribute in Python?

A.

It is accessible inside a class and an object.

B.

There is no such property.

C.

it is accessible inside an object

D.

It is accessible inside a class