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 #1775 · Back to latest

Older Posts 20 shown
Post #1774 2K
Что выведет код?
from functools import reduce
funcs = [str.title, lambda x: x*2]
print(reduce(lambda acc, f: f(acc), funcs, 'hello'))
  • 👍 4
Post #1771 1.96K
Что выведет код?
class A:
def __init__(self, value):
self.value = value
def __call__(self, other):
return self.value ** other
x = A(2)
print(x(3))
Post #1770 2.19K
  • 🤔 7
  • 👍 4
  • 😱 3
Post #1769 2.02K
Что выведет код?
def f(n):
x, y = -n, -n
return x is y
print(f(0), f(5), f(10))
Post #1768 2.58K
  • 👍 3
  • 👨‍💻 1
Post #1767 2.35K
Дан код:
class A:
def __init__(self, x):
self.x = x
def __and__(self, other):
return self.x + other.x
a1 = A(1)
a2 = A(2)
# ваш код

Вывод: 3
Post #1765 2.12K
Что выведет код?
(lambda: 1 + (lambda: 1 + (lambda: 1)())())()
Post #1763 2.06K
Что выведет код?
(lambda: 1 + lambda: 1 + lambda: 1)()()()
Post #1762 2.21K
  • 👏 2
  • 👍 1
  • 😱 1
Post #1761 2.13K
Что выведет код?
(lambda: lambda: lambda: lambda: lambda: 1)()()()()()
Post #1759 2.16K
Что выведет код?
ord('5') + ord('2') == 7
Post #1758 2.85K
  • 👍 6
  • 😱 4
Post #1757 2.42K
Что выведет код?
ord('5') - ord('2')
  • 👍 1
Post #1755 2.31K
Что выведет код?
class A:
def __repr__(self):
return "repr"
def __str__(self):
return "str"
a = A()
print(a, repr(a), str(a))
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 →