Choose your answer
Anonymous Quiz
15%
hellohi
25%
hellohihi
17%
hihi
17%
hello
6%
hi
21%
See solution
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])
What will this code do?
name = {
124: "Сергей",
444: "Анатолий",
952: "Николай"}
user_id = 375
print(name.get(user_id, "Алексей"))Choose your answer
Anonymous Quiz
0%
Сергей
2%
Анатолий
0%
Николай
40%
Алексей
3%
Николай, Алексей
51%
None
5%
See solution
What will this code do?
s = list(map(lambda x: x * x, (1, 2, 3, 4)))
print(s)
Choose your answer
Anonymous Quiz
4%
[1, 2, 3, 4]
69%
[1, 4, 9, 16]
8%
TypeError
4%
None
10%
<map object at 0x000001D7B265D278>
6%
See solution
What will this code do?
import numpy as np
a = np.array([[2, 4],[2, 8]])
print(np.mean(a))
Choose your answer
Anonymous Quiz
11%
[3,5]
20%
[[3], [5]]
25%
4.0
32%
4
0%
6.0
2%
6
9%
See solution
How to merge two dictionaries into one?
x and y are dictionaries.
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)
Choose your answer
Anonymous Quiz
17%
[1, 2, 3, 4, 5, 6]
65%
[5, 7, 9]
2%
21
9%
AttributeError
7%
See solution
What will this code do?
import numpy as np
mtx=np.array([[1, 2],
[3, 4]])
print(mtx.shape)
What will this code print?
Anonymous Quiz
27%
Number of rows and columns as a tuple
41%
Number of total elements
24%
Number of dimensions
8%
See solution
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)