71. What is the output of the following code:
square = lambda x: x**2
result = square(5)
print(result)
square = lambda x: x**2
result = square(5)
print(result)
72. What will be the output of the following Python code?
lamb = lambda x: x ** 3
print(lamb(5))
lamb = lambda x: x ** 3
print(lamb(5))
73. What will be the output of the following Python code?
x = [12, 34]
print(len(list(map(int, x))))
x = [12, 34]
print(len(list(map(int, x))))
74. What will be the output of the following Python code?
x = ['ab', 'cd']
print(list(map(upper, x)))
x = ['ab', 'cd']
print(list(map(upper, x)))
75. What will be the output of the following Python code?
x = 'abcd'
print(list(map([], x)))
x = 'abcd'
print(list(map([], x)))
76. What will be the output of the following Python code?
def f(x, y, z): return x + y + z
f(2, 30, 400)
def f(x, y, z): return x + y + z
f(2, 30, 400)
77. What will be the output of the following Python code?
x = 50
def func():
global x
print('x is', x)
x = 2
print('Changed global x to', x)
func()
print('Value of x is', x)
x = 50
def func():
global x
print('x is', x)
x = 2
print('Changed global x to', x)
func()
print('Value of x is', x)
78. How many keyword arguments can be passed to a function in a single function call?
79. What is the purpose of the assert statement in Python?
80. Only problems that are recursively defined can be solved using recursion.
Read More Section(Functions in Python)
Each Section contains maximum 100 MCQs question on Functions in Python. To get more questions visit other sections.