Python & ML tasks
416 subscribers
2 photos
3 links
Python, functions, classes, iterators, generators, numpy, pandas, scikit-learn, TensorFlow
for advertising: @dina_ladnyuk

For advertising and donations in USD:
SWIFTBIC BUKBGB22
IBAN GB40 BUKB 2047 3453 2396 99
Mrs Dina Ladnyuk
Download Telegram
Which of the options will not bring [0, 4, 16]?
Anonymous Quiz
9%
1
19%
2
32%
3
32%
4
9%
See solution
What will this code do?
[((x // y):) for х in range(3) if х % 2 == 0 for y in range(3) if y % 2 == 1]
What will this code do?
res = [х ** y for х in [2, 3] for y in [2, 3]]
print(res)
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
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
👍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%
Посмотреть результаты