What will be the output of the following Python code >>> import collections >>> b=dict() >>> b=collections.defaultdict(lambda: 7) >>> b[4]

1.  4

2.  0

3.  An exception is thrown

4.  7

4

7

Explanation :
No Explanation available for this question

What will be the output of the following Python code >>> import collections >>> a=collections.OrderedDict((str(x),x) for x in range(3)) >>> a

1.  {‘2’:2, ‘0’:0, ‘1’:1}

2.  OrderedDict([(‘0’, 0), (‘1’, 1), (‘2’, 2)])

3.  An exception is thrown

4.  ‘ ‘

4

OrderedDict([(‘0’, 0), (‘1’, 1), (‘2’, 2)])

Explanation :
No Explanation available for this question

Which of the following functions is a built-in function in python

1.  seed()

2.  sqrt()

3.  factorial()

4.  print()

4

print()

Explanation :
No Explanation available for this question

What will be the output of the following Python expression round(4.576)

1.  4.5

2.  5

3.  4

4.  4.6

4

5

Explanation :
No Explanation available for this question

The function pow(x,y,z) is evaluated as:

1.  (x**y)**z

2.  (x**y) / z

3.  (x**y) % z

4.  (x**y)*z

4

(x**y) \% z

Explanation :
No Explanation available for this question

What will be the output of the following Python function all([2,4,0,6])

1.  Error

2.  True

3.  False

4.  0

4

False

Explanation :
No Explanation available for this question

What will be the output of the following Python expression round(4.5676,2)?

1.  4.5

2.  4.6

3.  4.57

4.  4.56

4

4.57

Explanation :
No Explanation available for this question

What will be the output of the following Python function any([2>8, 4>2, 1>2])

1.  Error

2.  True

3.  False

4.  4>2

4

True

Explanation :
No Explanation available for this question

What will be the output of the following Python function import math abs(math.sqrt(25))

1.  Error

2.  -5

3.  5

4.  5.0

4

5.0

Explanation :
No Explanation available for this question

1.  Error, 6

2.  12, Error

3.  12, 6

4.  Error, Error

4