Skip to content

Comments

исправление багов#17

Open
dfdf11-cpu wants to merge 14 commits intopython-course-matmex:mainfrom
dfdf11-cpu:main
Open

исправление багов#17
dfdf11-cpu wants to merge 14 commits intopython-course-matmex:mainfrom
dfdf11-cpu:main

Conversation

@dfdf11-cpu
Copy link

добавила недостающие файлы в репозиторий, затем исправила баги в файлах checksum.py и binary_search.py

Евневич Екатерина. группа: Б42

Copy link

@Godrik0 Godrik0 left a comment

Choose a reason for hiding this comment

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

ISBN10: 4/10
Бинарный поиск: 3/5
Оформление: 7/10 (нужно было переписать всё в snake_case)

Comment on lines +31 to +32
calculated_checksum = total % 11
return calculated_checksum == checkDigit
Copy link

Choose a reason for hiding this comment

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

Ошибка в логике.
Нужно было либо оставить checksum = total + checkDigit и сравнивать остаток от деления на 11 с 0.
Либо высчитывать вот так (11 - (sum % 11)) % 11 и тогда уже сравнивать с контрольной цифрой.

Copy link

Choose a reason for hiding this comment

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

Тесты упадут, потому что импорт в файле тестов test/test_bin_searh.py не был обновлен, там так и осталось from src.bin_search import binSearch.

Copy link

Choose a reason for hiding this comment

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

В задании требовалось также реализовать консольную утилиту.

left, right = 0, len(xs) - 1
while left < right:

while left <= right:
Copy link

Choose a reason for hiding this comment

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

Нужно было добавить тесты, которые проверяют этот случай

Comment on lines +9 to +10
elif char.upper() == 'X':
remaining_chars = ISBNNumber[i:].replace('-', '').replace(' ', '')
Copy link

Choose a reason for hiding this comment

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

Нужно было добавить тестов на проверку X

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