Choose the correct answer
Anonymous Quiz
10%
[(0, 1)]
13%
[(2, 1)]
15%
[(0, 1), (2, 1)]
21%
[(0, 1), (0, 2), (2, 1)]
25%
[(0, 1), (0, 3), (2, 1), (2, 3)]
15%
See solution
What will this code do?
res = [х ** y for х in [2, 3] for y in [2, 3]]
print(res)
Choose the correct answer
Anonymous Quiz
8%
[4, 8]
9%
[4, 27]
8%
[8, 9]
21%
[9, 27]
8%
[2, 3, 2, 3]
14%
[4, 6, 6, 9]
26%
[4, 8, 9, 27]
8%
See solution
What will this code do?
listoftuple = [(0, 1, 2), (1, 2, 3)]
string1 = [b for (a, b, c) in listoftuple]
string2 = list(map((lambda row: row[1]), listoftuple))
print(string1 == string2, sum(string1))
😁1
Choose the correct answer
Anonymous Quiz
20%
True 1
9%
False 1
8%
True 2
14%
False 2
18%
True 3
8%
False 3
5%
True 6
3%
False 6
15%
SyntaxError
What will this code do?
def gen():
for i in range(1, 5):
x = yield i
if x:
yield x**2
g = gen()
v = g.send(g.send(next(g) + next(g)) + next(g))
print(v)
😁1
Choose the correct answer
Anonymous Quiz
19%
1
6%
3
9%
4
8%
9
12%
16
9%
81
8%
121
15%
144
4%
StopIteration
9%
None
👍2
What will this code do?
M = [[1, 2], [3, 4]]
N = [[5, 6], [7, 8]]
sum([col1*col2 for row1, row2 in zip(M, N) for col1, col2 in zip(row1, row2)])
👍1
Choose the correct answer
Anonymous Quiz
0%
36
0%
62
27%
70
19%
94
12%
100
15%
5760
27%
See solution
Что выведет код?
from collections import defaultdict
d = defaultdict(list)
d['a'].append(1)
d['a'].append(2)
d['b'].append(3)
sum((len(d['a']*3), len(d['b'])*5))
Выберите правильный вариант
Anonymous Quiz
14%
3
6%
4
3%
6
17%
7
17%
10
19%
11
11%
12
6%
19
8%
Посмотреть результаты