-
Notifications
You must be signed in to change notification settings - Fork 0
lesson-1 is done #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Hello @DoctorChe! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
|
| print(f"Введено число {d3}{d2}{d1}") | ||
|
|
||
| print(f"Сумма цифр введённого числа = {d3 + d2 + d1}") | ||
| print(f"Произведение цифр введённого числа = {d3 * d2 * d1}") |
There was a problem hiding this comment.
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}") |
There was a problem hiding this comment.
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}") |
There was a problem hiding this comment.
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}") |
There was a problem hiding this comment.
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} букв(а)") |
There was a problem hiding this comment.
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)}\"") |
There was a problem hiding this comment.
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("Такого треугольника не существует") |
There was a problem hiding this comment.
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} не високосный") |
There was a problem hiding this comment.
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"Среди введённых чисел нет среднего числа") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
здесь все хорошо
No description provided.