Python Tasks & ML | Задачи по питону и машинному обучению
Открыть в Telegram
Algorithms, functions, classes, regular expressions, iterators, generators, OOP, exceptions, NumPy, pandas, scikit-learn https://telega.in/c/python_tasks Questions — @dina_ladnyuk
Больше8 678
Подписчики
Нет данных24 часа
-57 дней
-4830 день
Архив постов
Выберите правильный вариант
Что выведет код?
print(1 or print(2, end = ' '))Выберите правильный вариант
Что выведет код?
x = {1, 2, 3}
y = {2, 3, 4}
print(x + y)Выберите правильный вариант
Что выведет код?
from random import random
try:
a = random() - 0.5
a = a/0
print(a, end=" ")
except:
print("err", end=" ")
finally:
print(a/a)Выберите правильный вариант
Что выведет код?
x = 'str' * 2
y = 'str' * 2.0
print(x == y, x is y)Выберите правильный вариант
Что выведет код?
class A:
pass
class B(A):
pass
a = A()
b = B()
print(isinstance(b, A), isinstance(a, B))Выберите правильный вариант
Что выведет код?
x = [2, 1, 3]
x = x.sort()
print(x[0])Выберите правильный вариант
Что выведет код?
x = [1, 2, 3]
y = sorted(x)
y.insert(0, 100)
print(x[0])Выберите правильный вариант
Что выведет код?
def f(*args):
result = []
for seq in args:
for x in seq:
if not x in result:
result.append(x)
return ''.join(result)
s1, s2, s3 = "message", "massage", "mask"
print(f(s1, s2, s3))Выберите правильный вариант
Что выведет код?
def f(*args):
res = ""
l = len("".join(args[:-1]))
for i, s in enumerate("".join(args)):
if i > l:
res += s
return res
s1, s2, s3= "one", "two", "three"
print(f(s1, s2, s3))Выберите правильный вариант
Что выведет код?
def f(*args):
result = []
for x in args[0]:
for word in args[1:]:
if x not in word:
break
else:
result.append(x)
return ''.join(result)
s1, s2, s3= "message", "massage", "mask"
print(f(s1, s2, s3))
Уже доступно! Исследование Telegram 2025 — ключевые инсайты года 
