Python & ML tasks
414 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
What will this code do?
a = [1, 5, 7]
b = [2, 4, 6]
c = a.extend(b)
print(c)
What will this code do?
d = {1: 'first', 2: 'second'}
d[4]='fourth'
print(len(d))
What will this code do?
x = 5
print([y // 2 for y in range(6)][x])
Choose your answer
Anonymous Quiz
2%
1
39%
2
12%
3
6%
4
9%
5
6%
6
26%
See solution
What is the value of the expression: 3^2
Anonymous Quiz
68%
9
3%
8
5%
6
2%
3
8%
2
11%
1
5%
See solution
What will this code do?
print((lambda x: print("hello", end="") or x*2)("hi"))
What will this code do?
import numpy as np
a = np.array([[10, 9],[2, 8]])
print(np.min(a))
What will this code do?
import numpy as np
matrix = np.array([[1, 2, 3],
[4, 5, 6],
[7, 8, 9]])
print(matrix[1, 1])
Choose your answer
Anonymous Quiz
18%
1
14%
2
4%
3
4%
4
57%
5
4%
See solution
What will this code do?
name = {
124: "Сергей",
444: "Анатолий",
952: "Николай"}
user_id = 375
print(name.get(user_id, "Алексей"))
What will this code do?
s = list(map(lambda x: x * x, (1, 2, 3, 4)))
print(s)
What will this code do?
import numpy as np
a = np.array([[2, 4],[2, 8]])
print(np.mean(a))
How to merge two dictionaries into one?
x and y are dictionaries.
Anonymous Quiz
39%
z = {**x, **y}
15%
z = {x + y}
11%
z = {*x, *y}
28%
z = x + y
7%
See solution