ExamVeda
Login
Home
71
Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is:
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
72
What will be the output of the following Python code?
>>>list1 = [1, 3]
>>>list2 = list1
>>>list1[0] = 4
>>>print(list2)
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
73
What will be the output of the following Python code?
data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
 
def ttt(m):
    v = m[0][0]
 
    for row in m:
        for element in row:
           if v < element: v = element
 
    return v
 
print(ttt(data[0]))
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
74
What will be the output of the following Python code?
word1="Apple"
word2="Apple"
list1=[1,2,3]
list2=[1,2,3]
print(word1 is word2)
print(list1 is list2)
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
75
Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing operation?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
76
What will be the output of the following Python code?
names1 = ['Amir', 'Bala', 'Chales']
 
if 'amir' in names1:
    print(1)
else:
    print(2)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
77
What will be the output of the following Python code?
a=165
b=sum(list(map(int,str(a))))
print(b)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
78
What will be the output of the following Python code?
a=[[]]*3
a[1].append(7)
print(a)
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
79
What will be the output of the following Python code?
def unpack(a,b,c,d):
    print(a+d)
x = [1,2,3,4]
unpack(*x)
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
80
What will be the output of the following Python code snippet?
print([if i%2==0: i; else: i+1; for i in range(4)])
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board