Skip to content

Conversation

@DoctorChe
Copy link
Owner

No description provided.

@pep8speaks
Copy link

Hello @DoctorChe! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 1:80: E501 line too long (85 > 79 characters)

Line 7:80: E501 line too long (84 > 79 characters)

Line 22:80: E501 line too long (82 > 79 characters)
Line 23:80: E501 line too long (81 > 79 characters)

print(f"Введено число {d3}{d2}{d1}")

print(f"Сумма цифр введённого числа = {d3 + d2 + d1}")
print(f"Произведение цифр введённого числа = {d3 * d2 * d1}")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

абсолютно верная реализация

print(f"Побитовая операция исключительное ИЛИ над числами 5 и 6: (5 ^ 6) = {5 ^ 6}")

print(f"Побитовый сдвиг влево над числом 5 на два знака: (5 << 2) = {5 << 2}")
print(f"Побитовый сдвиг вправо над числом 5 на два знака: (5 >> 2) = {5 >> 2}")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

хорошо

if b >= 0:
print(f"Уравнение прямой: y = {k}x + {b}")
else:
print(f"Уравнение прямой: y = {k}x - {b * -1}")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

все гуд

s = chr(abs(int(random() * (ord(s2) - ord(s1) + 1)) + ord(s1)))
else:
s = chr(abs(int(random() * (ord(s1) - ord(s2) + 1)) + ord(s2)))
print(f"Случайный символ в диапазоне от {s1} до {s2}: {s}")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

да, здесь можно исп-ть встроенные ф-ции


print(f"Первая буква находится на {s1 - first + 1}-м месте алфавита")
print(f"Первая буква находится на {s2 - first + 1}-м месте алфавита")
print(f"Между этими буквами находится {count} букв(а)")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

работает отлично, в том числе и при обратном порядке букв

# 6. Пользователь вводит номер буквы в алфавите. Определить, какая это буква.

s = int(input("Введте номер буквы в алфавите: "))
print(f"Буква под номером {s} - это \"{chr(s + ord('a') - 1)}\"")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

хорошо.
+, что везде исп-ся ф-строки

elif (l1 == l2) or (l2 == l3) or (l1 == l3):
print("Треугольник является равнобедренным")
else:
print("Такого треугольника не существует")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

отлично

if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0:
print(f"Год {year} является високосным")
else:
print(f"Год {year} не високосный")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

отлично, вижу группировку условий

elif b < a < c or b > a > c:
print(f"Средним является число {a}")
else:
print(f"Среди введённых чисел нет среднего числа")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

здесь все хорошо

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants