ExamVeda
Login
Home
1
How can you pass multiple arguments to a function as a tuple?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
2
What will be the output of the following Python code?
def maximum(x, y):
    if x > y:
        return x
    elif x == y:
        return 'The numbers are equal'
    else:
        return y
 
print(maximum(2, 3))
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
3
Which of the following is a feature of DocString?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
4
In . . . . . . . . copy, the modification done on one list affects the other list. In . . . . . . . . copy, the modification done on one list does not affect the other list.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
5
What will be the output of the following Python code?
l1=[10, 20, 30, [40]]
l2=copy.deepcopy(l1)
l1[3][0]=90
l1
l2
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
6
What will be the output of the following Python code?
y = 6
z = lambda x: x * y
print z(8)
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
7
What will be the output of the following Python code?
L = [lambda x: x ** 2,
         lambda x: x ** 3,
         lambda x: x ** 4]
 
for f in L:
	print(f(3))
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
8
Which are the advantages of functions in python?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
9
Lambda is a statement.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
10
What will be the output of the following Python code?
def func(a, b=5, c=10):
    print('a is', a, 'and b is', b, 'and c is', c)
 
func(3, 7)
func(25, c = 24)
func(c = 50, a = 100)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board