ExamVeda
Login
Home
51
What will be the output of the following Python code?
x = [34, 56]
print(len(map(str, x)))
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
52
What will be the output of the following Python code?
i=0
def change(i):
   i=i+1
   return i
change(1)
print(i)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
53
What will be the output of the following Python code?
def foo(x):
    x[0] = ['def']
    x[1] = ['abc']
    return id(x)
q = ['abc', 'def']
print(id(q) == foo(q))
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
54
Which of the following refers to mathematical function?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
55
What will be the output of the following Python code?
a=10
globals()['a']=25
print(a)
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
56
Recursion and iteration are the same programming approach.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
57
What will be the output of the following Python code?
def a(b):
    b = b + [5]
 
c = [1, 2, 3, 4]
a(c)
print(len(c))
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
58
What is the length of sys.argv?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
59
What will be the output of the following Python code and state the type of copy that is depicted?
l1=[2, 4, 6, 8]
l2=[1, 2, 3]
l1=l2
l2
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
60
What will be the output of the following Python code?
elements = [0, 1, 2]
def incr(x):
    return x+1
print(list(map(incr, elements)))
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board