TGViewer
Channel Public Channel
Machinelearning tests

Machinelearning tests

@machinelearningtest

По всем вопросам- @haarrp

@ai_machinelearning_big_data - машинное обучение

@programming_books_it - бесплатные it книги

@pythonl - 🐍

@ArtificialIntelligencedl - AI

@datascienceiot -ds книги
Subscribers
661
Photos
35
Videos
0
Links
0

Showing posts older than #133 · Back to latest

Older Posts 20 shown
Post #130 619
Что выведет код?
import numpy as np
x = np.linspace(0, 1, 2)
y = np.linspace(0, 1, 3)
X1, Y1 = np.meshgrid(x, y)
X2, Y2 = np.meshgrid(x, y, sparse=True)
print(*X1.shape, *Y1.shape, *X2.shape, *Y2.shape)
Post #128 787
Дан код:
class A:
pass
class B:
pass
class C(A, B):
pass
class D(C):
pass

Нужно вывести порядок разрешения методов для класса D (Method Resolution Order, MRO).
Каким методом это сделать и каков будет порядок классов?
Post #126 703
Что выведет код?

recs = [(1, 2, 3), (1, 2), (3, 4), (0, 1, 2, 3, 4)]
s = 0
for a, *b in recs:
s += sum(b)
print(s)
Post #124 700
Что выведет код?

import numpy as np
a = np.array([0, 1, -2, 3])
b = a[abs(a) % 2 == 0]
print(*b)
Post #122 812
Дан код (Python3):
class A:
# ваш код
def f():
print('hi')
a = A()
a.f()

Что нужно добавить, чтобы код работал?
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 →