Python & ML tasks
415 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
Given code (Python3):
class A:
# your code
def f():
print('hi')
a = A()
a.f()
What do you need to add to make the code work?
Anonymous Quiz
27%
none of the above
14%
See solution
Given code (Python3):
class A:
# your code
def f():
print('hi')
a = A()
A.f()
What do you need to add to make the code work?
Anonymous Quiz
12%
none of the above
6%
See solution
Given code
class A:
pass
class B:
pass
class C(A, B):
pass
class D(C):
pass
What will this code do?

import numpy as np
a = np.array([[1, 2, 3], [4, 5, 6]])
print(a.reshape(1, -1))
What will this code do?

class A:
def __repr__(self):
return "repr"
def __str__(self):
return "str"
a = A()
print(a, repr(a), str(a))
What will this code do?
ord('5') - ord('2')
What will this code do?
ord('5') + ord('2') == 7
Choose your answer
Anonymous Quiz
32%
True
48%
False
10%
TypeError
10%
See solution
What will this code do?
(lambda: lambda: lambda: lambda: lambda: 1)()()()()()
What will this code do?
(lambda: 1 + lambda: 1 + lambda: 1)()()()
What will this code do?
(lambda: 1 + (lambda: 1 + (lambda: 1)())())()