ExamVeda
Login
Home
41
Which of these is false about a package?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
42
Lambda contains block of statements.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
43
What happens if the base condition isn't defined in recursive programs?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
44
What will be the output of the following Python code?
def to_upper(k):
    return k.upper()
x = ['ab', 'cd']
print(list(map(upper, x)))
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
45
Observe the following Python code?
def a(n):
    if n == 0:
        return 0
    else:
        return n*a(n - 1)
def b(n, tot):
    if n == 0:
        return tot
    else:
        return b(n-2, tot-2)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
46
What will be the output of the following Python code?
def a(n):
    if n == 0:
        return 0
    elif n == 1:
        return 1
    else:
        return a(n-1)+a(n-2)
for i in range(0,4):
    print(a(i),end=" ")
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
47
What will be the output of the following Python code?
def printMax(a, b):
    if a > b:
        print(a, 'is maximum')
    elif a == b:
        print(a, 'is equal to', b)
    else:
        print(b, 'is maximum')
printMax(3, 4)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
48
What will be the output of the following Python code?
def f(): x=4
x=1
f()
x
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
49
What will be the output of the following Python code?
l=[1, -2, -3, 4, 5]
def f1(x):
    return x<-1
m1=map(f1, l)
print(list(m1))
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
50
What will be the output of the following Python code?
a=10
b=20
def change():
    global b
    a=45
    b=56
change()
print(a)
print(b)
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board