-
Notifications
You must be signed in to change notification settings - Fork 0
Homework Lesson2 #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: lesson1b
Are you sure you want to change the base?
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.
Оставил комментарии по коду
| if 0 != numb: | ||
| print(f'Результат деления: {numa/numb}') | ||
| else: | ||
| print('Не дели на 0!') |
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.
Потеряли стрелочку в блок-схеме
| oddcnt = nonoddcnt = 0 | ||
| for i, c in enumerate(number): | ||
| check = int(c) | ||
| if check % 2 == 0: |
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,0 +1,13 @@ | |||
| start = 32 | |||
| end = 128 | |||
| symbolsinline = 10 | |||
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'{i} - {chr(i)}', end=' ') | ||
| i = i + 1 | ||
| c = c - 1 | ||
| if i > end: |
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.
По условию задачи 128-й символ выводить не нужно.
Кстати, не забывайте в начале файла писать условие задачи.
| while True: | ||
| c = symbolsinline | ||
| while c > 0: | ||
| print(f'{i} - {chr(i)}', end=' ') |
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 answer == number: | ||
| print('Вы угадали!') | ||
| exit(0) | ||
| if answer > number: |
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 избавит от лишних проверок.
| @@ -0,0 +1,5 @@ | |||
| number = input('Введите целое число: ') | |||
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.
Верно
| @@ -0,0 +1,8 @@ | |||
| number = input('Введите целое число: ') | |||
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.