ExamVeda
Login
Home
51
What will be the output of the following Python code?
l=[[1, 2, 3], [4, 5, 6]]
for i in range(len(l)):
	for j in range(len(l[i])):
		l[i][j]+=10
l
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
52
To shuffle the list(say list1) what function do we use?
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?
t=32.00
[round((x-32)*5/9) for x in t]
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
54
To which of the following the "in" operator can be used to check if an item is in it?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
55
Read the information given below carefully and write a list comprehension such that the output is: ['e', 'o']
w="hello"
v=('a', 'e', 'i', 'o', 'u')
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
56
What will be the output of the following Python code?
import math
[str(round(math.pi)) for i in range (1, 6)]
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
57
What will be the output of the following Python code?
l=[1,2,3,4,5]
[x&1 for x in l]
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
58
What will be the output of the following Python code?
a = [1, 5, 7, 9, 9, 1]

b=a[0]
x= 0 for x in range(1, len(a)): if a[x] > b: b = a[x] b= x print(b)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
59
What will be the output of the following Python code?
a="hello"
b=list((x.upper(),len(x)) for x in a)
print(b)
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
60
What will be the output of the following Python code?
values = [[3, 4, 5, 1], [33, 6, 1, 2]]
 
v = values[0][0]
for row in range(0, len(values)):
    for column in range(0, len(values[row])):
        if v < values[row][column]:
            v = values[row][column]
 
print(v)
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board