Skip to content

Задание к уроку 1#1

Open
TonyBrother32 wants to merge 1 commit intomainfrom
Lesson_1
Open

Задание к уроку 1#1
TonyBrother32 wants to merge 1 commit intomainfrom
Lesson_1

Conversation

@TonyBrother32
Copy link
Owner

Задание к уроку 1

Задание к уроку 1
Copy link

@Dzhoker1 Dzhoker1 left a comment

Choose a reason for hiding this comment

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

Оставил комментарии по коду

d1 = n % 10
d2 = n // 10 % 10
d3 = n // 100
print("Сумма цифр числа:", d1 + d2 + d3)

Choose a reason for hiding this comment

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

Не стоит смешивать процесс и ввод. А ещё не стоит копировать код в блоки графического алгоритма. Ведь если вы пришли за знаниями и новым опытом, первая строчка кода должна быть написана после полного завершения графического алгоритма.

y1 = float(input('Введите кординаты y1 '))
x2 = float(input('Введите кординаты x2 '))
y2 = float(input('Введите кординаты y2 '))
k = (y2 - y1)/(x2 - x1)

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.

2 participants