ExamVeda
Login
Home
31
How are keyword arguments specified in the function heading?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
32
Fill in the line of the following Python code for calculating the factorial of a number.
def fact(num):
    if num == 0: 
        return 1
    else:
        return _____________________
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
33
What will be the output of the following Python code?
def fun(n):
    if (n > 100):
        return n - 5
    return fun(fun(n+11));
 
print(fun(45))
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
34
What will be the output of the following Python code?
list(map((lambda x:x**2), filter((lambda x:x%2==0), range(10))))
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
35
What will be the output of the following code:
def my_function(a, b):
  return a / b
result = my_function(4, 2)
print(result)
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
36
What will be the output of the following Python code?
a = [1, 2, 3, 4, 5]
b = lambda x: (b (x[1:]) + x[:1] if x else []) 
print(b (a))
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
37
Which of the following statements is false about recursion?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
38
What will be the output of the following Python code?
x = ['ab', 'cd']
print(len(list(map(list, x))))
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
39
Which of these is not true about recursion?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
40
What will be the output of the following Python code?
list(map((lambda x:x^2), range(10)))
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board