TGViewer
Channel Public Channel
Python Tasks & ML | Задачи по питону и машинному обучению

Python Tasks & ML | Задачи по питону и машинному обучению

@python_tasks

Algorithms, functions, classes, regular expressions, iterators, generators, OOP, exceptions, NumPy, pandas, scikit-learn
https://telega.in/c/python_tasks

Questions — @dina_ladnyuk
Subscribers
8.49K
Photos
30
Videos
1
Links
41

Showing posts older than #1517 · Back to latest

Older Posts 20 shown
Post #1516 2.62K
  • 👍 6
  • 😱 1
Post #1515 2.53K
Что выведет код?
class B:
def __init__(self) :
print ('В', end='')
super().__init__()
class C:
def __init__(self):
print('C', end='')
super().__init__ ()
class D(B, C):
def __init__(self):
print('D', end='')
B.__init__(self)
C.__init__(self)
X = D()
  • 👎 4
  • 👍 2
Post #1513 2.64K
Что выведет код?
class A:
def f(self):
print('A', end="")
class B:
def f(self):
print('B', end="")
class C(A):
def f(self):
print("C", end="")
super().f()
self.__class__.__bases__ = (B,)
x = C()
_ = x.f(), x.f()
  • 👍 3
Post #1512 3.36K
  • 🔥 6
  • 👍 1
Post #1511 2.96K
Что выведет код?
x = [0, None]
y = ["abc", 1]
s = (any(x), any(y)) == (all(x), all(y))
print(s)
  • 👍 2
Post #1509 2.85K
Что выведет код?
x = [0, None, 1]
y = []
s = (any(x), any(y)) == (all(y), all(x))
print(s)
  • 👍 7
  • 👎 1
Post #1507 2.49K
Что выведет код?
s = [1, 2, 1, 1, 1, 3]
print(s.count(1) + s.index(2))
  • 👍 3
Post #1505 2.47K
Что выведет код?
s = [1, 2, 1]
print(s.index(1), s.index(2))
  • 👍 3
Post #1502 2.55K
  • 👍 2
  • 😱 1
Post #1501 2.41K
Что выведет код?
a = "Xmas"
b = a
a = "New Year"
print((a is b))
  • 👍 1
Post #1500 2.79K
  • 👍 9
  • 😱 1
Post #1499 2.39K
Что выведет код?
s = [1, 2, 3]
s.append(3)
s = list(sorted(set(s)))
s.pop()
s.remove(1)
print(*s)
  • 👍 2
Post #1497 2.59K
  • 😱 6
  • 👍 4
Post #1496 2.56K
Что выведет код?
s = [1, 2, 3, 4]
s.insert(2, 100)
del s[:2]
s.pop()
s.remove(3)
print(*s)
  • 👍 4
Older posts →
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →