Python & ML tasks
416 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?
class A:
x = 1

class B(A):
pass

class C(A):
pass

A.x = 2
B.x = 3

print(B.x, C.x)
What will this code do?
print(1 and 2 and 3)
What will this code do?
from typing import Final
x: Final = 'hi'
x = 'hello'
print(x)
What will this code do?
a = None
print(a is None is True)
Choose your answer
Anonymous Quiz
61%
True
33%
False
6%
TypeError
0%
See solution
What will this code do?
a = None
b = None
a is b is None
Choose your answer
Anonymous Quiz
41%
True
47%
False
6%
TypeError
6%
See solution
What will this code do?
a = {0, 1, 2}
print(a[1])
What will this code do?
a = (100, 2)
b = (1, 103)
print(a > b)
Choose your answer
Anonymous Quiz
52%
True
24%
False
19%
TypeError
5%
See solution
What will this code do?
def f(p, q):
return p + q

x = list(map(f, ('a', 'b', 'c'), ('x', 'y', 'z')))
print(x[1])
What will this code do?
x = {1: "A", 3: "B"}
y = {2: "C", 3: "D", 4: "E"}
d = {**x, **y}
vals = sorted(d.values())
print(*vals)
What will this code do?
def outer():
x = "local"
def inner():
nonlocal x
x = "nonlocal"
print(x, end=" ")
inner()
print(x)
outer()