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
Choose the correct way to reverse the order of the elements (the original list must be changed):
my_list = [1, 2, 3, 4]
Anonymous Quiz
9%
print(i for i in reversed(my_list)])
7%
my_list.rev(); print(my_list)
43%
my_list.reverse(); print(my_list)
35%
print(my_list[::-1])
7%
See solution
Channel photo updated
What will this code do?
a = [1, 2, 3, 3]
b = {1, 2, 3, 3}
print(set(a) == b)
print(b == list(a))
What will this code do?
a = 2
b = 3
d = "{a}{b}{ab}".format(a=4, b=5, ab=a*b)
print(d)
Choose your answer:
Anonymous Quiz
20%
236
11%
4523
0%
206
56%
456
13%
See solution
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