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?
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
What will this code do?
s = list(map(lambda x, y: x + y, [1, 2, 3], [4, 5, 6]))
print(s)
What will this code do?
import numpy as np
mtx=np.array([[1, 2],
[3, 4]])

print(mtx.shape)
import numpy as np
mtx=np.array([[1, 2],
[3, 4]])

print(mtx.size)
Fill in the gap
def gt_100(x):
if x > 100:
return True
else:
return False

import numpy as np
matrix = np.array([[99, 101], [100, 102]])
#your code
gt_100(matrix)