Completed
Class 11 CS – String & List Basics Test
Questions From This Challenge
Q1mcq1 mark
What will be the output? s = "COMPUTER" print(s[1:7:2])
OPU
OMT
OPT ✓
OPR
Q2output1 mark
What will be the output?
L = [10, 20, 30, 40] L[1] = L[3] - L[0] print(L)
Correct output:
[10, 30, 30, 40]Q3mcq1 mark
What will be the output? s = "Python" print(s[-1] + s[1:4])
nyth ✓
ntyh
Python
ythn
Q4mcq1 mark
What will be the output? L = [1, 2, 3] L = L + [4, 5] print(L)
[4, 5, 1, 2, 3]
[1, 2, 3, 4, 5] ✓
[1, 2, 3, [4, 5]]
[1, 2, 3, 5]
Q5output1 mark
What will be the output?
L = [2, 4, 6, 8] print(L[1:3] + L[0:1])
Correct output:
[4, 6, 2]Q6mcq1 mark
What will be the output? s = "Programming" print("gram" in s, "xyz" not in s)
True True ✓
True False
False True
False False
Q7output1 mark
What will be the output?
L = [10, 20, 30] L[0] = L[1] L[2] = L[0] + 5 print(L)
Correct output:
[20, 20, 25]Q8mcq1 mark
What will be the output? s = "ABCD" print(s * 2 + s[1:3])
ABCDABCD
ABCDABCDBC ✓
ABCDBCABCD
ABCDABBC
Q9mcq1 mark
Which expression produces [50, 40, 30]? L = [10, 20, 30, 40, 50]
L[-1:-4:-1]
L[4:1:-1]
Both A and B ✓
L[4:2:-1]
Q10output1 mark
What will be the output?
L = [2, 4, 6, 8]
x = 0
for i in L:
if i > 4:
x = x + i
print(x)
Correct output:
14Q11output1 mark
What will be the output?
s = "COMPUTER"
result = ""
for i in range(0, 8, 2):
result = result + s[i]
print(result)
Correct output:
CMUEQ12output1 mark
What will be the output?
L = [1, 2, 3] L = L * 2 L[2] = 10 print(L)
Correct output:
[1, 2, 10, 1, 2, 3]Q13mcq1 mark
What will be the output? s = "Python" x = s[0:3] y = s[-3:] print(x + y)
Python ✓
Pythhon
Pytthon
PythonPython
Q14output1 mark
What will be the output?
L = [5, 10, 15, 20]
x = L[0]
for i in L:
if i > x:
x = i
print(x)
Correct output:
20Q15output1 mark
What will be the output?
s = "LIST" L = [s[0], s[2], s[-1]] print(L)
Correct output:
['L', 'S', 'T']