# What will be the output of the following Python code def power(x, y=2): r = 1 for i in range(y): r = r * x return r print power(3) print power(3, 3)

1.  21232

2.  927

3.  56798

4.  None of the mentioned

4

9
27

Explanation :
No Explanation available for this question

# What will be the output of the following Python code def sum(*args): '''Function returns the sum of all values''' r = 0 for i in args: r += i return r print sum.__doc__ print sum(1, 2, 3) print sum(1, 2, 3, 4, 5)

1.  615

2.  6100

3.  12312345

4.  None of the mentioned

4

6
15

Explanation :
No Explanation available for this question

# Python supports the creation of anonymous functions at runtime, using a construct called __________

1.  lambda

2.  pi

3.  anonymous

4.  none of the mentioned

4

lambda

Explanation :
No Explanation available for this question

# What will be the output of the following Python code y = 6 z = lambda x: x * y print z(8)

1.  48

2.  14

3.  64

4.  None of the mentioned

4

48

Explanation :
No Explanation available for this question

# What will be the output of the following Python code lamb = lambda x: x ** 3 print(lamb(5))

1.  15

2.  555

3.  125

4.  None of the mentioned

4

125

Explanation :
No Explanation available for this question

# Does Lambda contains return statements

1.  True

2.  False

2

False

Explanation :
No Explanation available for this question

# Lambda is a statement

1.  True

2.  False

2

False

Explanation :
No Explanation available for this question

# Lambda contains block of statements.

1.  True

2.  False

2

False

Explanation :
No Explanation available for this question

# What will be the output of the following Python code def f(x, y, z): return x + y + z f(2, 30, 400)

1.  432

2.  24000

3.  430

4.  No output

4

432

Explanation :
No Explanation available for this question

# What will be the output of the following Python code def writer(): title = 'Sir' name = (lambda x:title + ' ' + x) return name who = writer() who('Arthur')

1.  Arthur Sir

2.  Sir Arthur

3.  Arthur

4.  None of the mentioned

4