Skip to content

Homework Lesson2 - #2

Open
iisat wants to merge 1 commit into
lesson1bfrom
lesson2
Open

iisat wants to merge 1 commit into
lesson1bfrom
lesson2

Conversation

@iisat

@iisat iisat commented Oct 31, 2018

Copy link
Copy Markdown
Owner

No description provided.

@Dzhoker1 Dzhoker1 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment thread Lesson2/Task1.py
if 0 != numb:
print(f'Результат деления: {numa/numb}')
else:
print('Не дели на 0!')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Потеряли стрелочку в блок-схеме

Comment thread Lesson2/task2.py
oddcnt = nonoddcnt = 0
for i, c in enumerate(number):
check = int(c)
if check % 2 == 0:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Подписывайте на блок-схеме истину и ложь. Иногда можно запутаться )))

Comment thread Lesson2/task5.py
@@ -0,0 +1,13 @@
start = 32
end = 128
symbolsinline = 10

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Не забывайте про _, если имя переменной состоит из нескольких слов

Comment thread Lesson2/task5.py
print(f'{i} - {chr(i)}', end=' ')
i = i + 1
c = c - 1
if i > end:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

По условию задачи 128-й символ выводить не нужно.
Кстати, не забывайте в начале файла писать условие задачи.

Comment thread Lesson2/task5.py
while True:
c = symbolsinline
while c > 0:
print(f'{i} - {chr(i)}', end=' ')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Перепутали фигуры на блок-схеме

Comment thread Lesson2/task6.py
if answer == number:
print('Вы угадали!')
exit(0)
if answer > number:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

elif избавит от лишних проверок.

Comment thread Lesson2/Task3.py
@@ -0,0 +1,5 @@
number = input('Введите целое число: ')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Верно

Comment thread Lesson2/Task8.py
@@ -0,0 +1,8 @@
number = input('Введите целое число: ')

Copy link
Copy Markdown

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