Question 1 |
s1.union([3, 4, 5]) | |
s1.union({3, 4, 5})
| |
none of them | |
s1 | [3, 4, 5] | |
s1 | set([3, 4, 5]) |
Question 2 |
x[3:4] | |
x[3:5] | |
x[2:5] | |
x[2:4] | |
x[2:3] |
Question 3 |
{1,2,3} | |
{1,2,2,3,3,7,10,15} | |
{1,2,3,7,10,15} | |
{2,3,7,10,15} | |
{2, 3} |
Question 4 |
x[0] | |
x[-1] | |
none of them | |
x[1] | |
x[ ] |
Question 5 |
none of them | |
else | |
if | |
elif | |
elseif |
Question 6 |
[55, 150, 155, 250, 255] | |
[5, 10, 15, 20, 25] | |
[50, 100, 150, 200, 250] | |
none of them | |
[110, 120, 130, 140, 150] |
Question 7 |
remove | |
split | |
index | |
upper | |
join |
Question 8 |
Exception | |
x | |
None of them | |
5 | |
An Error! |
Question 9 |
4 | |
6 | |
5 | |
8 | |
7 |
Question 10 |
copy() | |
insert() | |
append() | |
extend() | |
sort() |
Question 11 |
20 | |
8 | |
12 | |
16 | |
4 |
Question 12 |
[1, 2, 3, 4, 5, 6, 7, 8, 9] | |
[0, 1, 3, 5, 7, 9] | |
[2, 4, 6, 8] | |
[1, 3, 5, 7, 9] | |
[2, 4, 6, 8, 10] |
Question 13 |
[6, 7, 8] | |
[5, 6, 7, 8, 9, 10] | |
[5, 6, 7, 8, 9] | |
[6, 7, 8, 9] | |
[5, 6, 7, 8] |
Question 14 |
except | |
pass | |
try | |
break | |
continue |
Question 15 |
10 | |
0 | |
1800 | |
180 | |
18 |
Question 16 |
.py | |
.p | |
.ptx | |
.pyt | |
.txt |
Question 17 |
y[-1] | |
y[1] | |
y[2] | |
y[-2] | |
y[3] |
Question 18 |
5 | |
9 | |
7 | |
6 | |
8 |
Question 19 |
sort() | |
replace() | |
remove() | |
strip() | |
del() |
Question 20 |
tuple | |
list | |
all of them | |
set | |
dictionary |