-
Notifications
You must be signed in to change notification settings - Fork 0
Lesson02 #2
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?
Lesson02 #2
Conversation
Dzhoker1
left a comment
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.
Оставил комментарии по коду
| # должна сообщать пользователю о невозможности деления на ноль, если он ввел его в | ||
| # качестве делителя. | ||
|
|
||
| while True: |
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.
Отличное начало
|
|
||
|
|
||
| def chet_ne_chet(x): | ||
| global chet |
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.
По блок-схеме видно, что автор активно думал о реализации на Python, когда рисовал. Даже глобальные переменные нарисовал.
Хорошим тоном считается передавать значение как аргумент функции, а не объявлять переменную глобальной.
| # Сформировать из введенного числа обратное по порядку входящих в него цифр | ||
| # и вывести на экран. Например, если введено число 3486, надо вывести 6843. | ||
|
|
||
| def Reverse(x): |
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.
Авторский стиль в каждой работе. Что ж, принимается :-)))
Только используйте snake_case для имён, как рекомендуют авторы языка.
| r = r / 2 | ||
| if r % 2 != 0: | ||
| r = r * (-1) | ||
| return(element(r,k-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.
А судя по блок-схеме перед return нужен else.
Говорил о подобных недочётах во время разбора.
| size_col = 6 | ||
| start_ = 32 | ||
| end_ = 127 | ||
| for i in range(start_,end_+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.
+1 к работам, которые студенты сдают даже не запустив.
Да, на уроке было и про это. Нет элементов с 122 по 127.
Выполнил