ExamVeda
Login
Home
41
Tuples can't be made keys of a dictionary.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
42
What will be the output of the following Python code?
>>> a=(0,1,2,3,4)
>>> b=slice(0,2)
>>> a[b]
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
43
Is the following Python code valid?
>>> a,b,c=1,2,3
>>> a,b,c
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
44
What will be the output of the following Python code?
>>>t = (1, 2)
>>>2 * t
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
45
What will be the output of the following Python code?
>>> a,b=6,7
>>> a,b=b,a
>>> a,b
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
46
If a=(1,2,3,4), a[1:-1] is . . . . . . . .
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?
numberGames = {}
numberGames[(1,2,4)] = 8
numberGames[(4,2,1)] = 10
numberGames[(1,2)] = 12
sum = 0
for k in numberGames:
    sum += numberGames[k]
print(len(numberGames) + sum)
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?
d = {"john":40, "peter":45}
d["john"]
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
49
What will be the output of the following Python code?
>>> a=(2,3,4)
>>> sum(a,3)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
50
What will be the output of the following Python code?
>>> a=(2,3,1,5)
>>> a.sort()
>>> a
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board