Skip to content

HW2_Kvyato#6

Open
alexk-git wants to merge 39 commits intoPython-BI-2025-26:mainfrom
alexk-git:HW2_Kvyato
Open

HW2_Kvyato#6
alexk-git wants to merge 39 commits intoPython-BI-2025-26:mainfrom
alexk-git:HW2_Kvyato

Conversation

@alexk-git
Copy link

HW2_Kvyato

alexk-git and others added 30 commits September 13, 2025 23:42
        added division function
        added template for main function
The addition function with docstring
        all functions are collected together
        input expression checks are added
        added function simple clean
        added docstrings
        add function simple_clean usage
	new file:   imgs/hw2_sozvon2.jpg
        added screenshot of meeting
"Add a subtraction operation function."
added check-boxes for complited tasks
added Fratures and Input format
added Core Functions and developers
played with fonts
one more played with fonts
added Team Structure and Usage
        remove debugging output
added Usage example
add Team Collaboration
added links for hw2_sozvon's screenshots
img to imgs update
minor changes: add some enters (\n)
added emoji for Core Functions and Team Structure
alexk-git and others added 9 commits September 17, 2025 00:19
minor update in Team Structure
Add links to the github profiles of team members
Update README.md
added links to git-accounts
	new file:   HW2_Kvyato/README.md
	renamed:    imgs/hw2_sozvon1.jpg -> HW2_Kvyato/hw2_sozvon1.jpg
	renamed:    imgs/hw2_sozvon2.jpg -> HW2_Kvyato/hw2_sozvon2.jpg
	deleted:    imgs/image_2_1.png
	deleted:    imgs/image_2_2.png
	modified:   README.md
        update path to images
        update path for image #2
	new file:   imgs/image_2_1.png
	new file:   imgs/image_2_2.png

        returned accidentally deleted files
Copy link

@Valeriisht Valeriisht left a comment

Choose a reason for hiding this comment

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

Привет!✨

Отличная качественная работа! Респект за README - все понятно и по делу. Небольшое замечание - фото картинок лучше помещать в отдельные папки (например, создать папку imgs, и в нее загрузить все картинки. держим репозиторий в красивом виде)

Что хочется отметить:

  • лайк за дополнительные проверки вводимых значений
  • хорошие названия коммитов
  • докстринги это круто
  • в целом, код продуманный и консистентный

А еще мне понравились пояснения к выводу результатов)
Есть небольшие замечания, которые поясню в комментах к коду.

Итоговые баллы за задание: 10/10 (README) + 10/10 (Forks) + 79/80 (код и коммиты) + 10 доп. за картинку созвона + 2 доп. (за код (1б - достринги ) и ридми (1б)) = 99/100 + 12 доп.

Вы большие молодцы, сделали все очень хорошо! Просто чуть внимательнее и меньше усложнении!!) Удачи дальше!

(тимлид, не забудь показать ревью остальным участникам команды)

- **Division & Main**: [Alexey Kvyato](https://github.com/alexk-git) (Team Lead)
- **Addition**: [Elizaveta Salnikova](https://github.com/lvsea00)
- **Subtraction**: [Anton Shaposhnikov](https://github.com/KuchukLambat)
- **Multiplication**: [Timofei Bulgakov](https://github.com/Tim-Bulgakov)

Choose a reason for hiding this comment

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

супер, что вставили ссылки!

Checking if expression is in required format:
(number)(space)(operator)(space)(number)
'''
pattern = r'^\d+(?:\.\d+)?\s[+\-*/]\s\d+(?:\.\d+)?$'

Choose a reason for hiding this comment

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

любимые регулярные выражения....)

круто, что вы уже умеете их писать! но тут, думаю, излишне. можно проще проверить при парсинге выражения (лучше использование try/except вместо сложных регулярных выражений)
лучше проще написать код, без всяких излишеств, но зато понятнее и меньше шанс ошибиться.

image

замечание: ваш код не работает с отрицательными числами

Your expression is not passed validity check!
Please, enter your expression as 'a <operator> b' <- spaces are impotant!
But your expression is -5 + 8.```

if is_expression_valid(input_expr):
expr_lst = input_expr.split(' ')

if expr_lst[1] == '+': print(f"Result of {input_expr} = {addition(float(expr_lst[0]), float(expr_lst[2]))}")

Choose a reason for hiding this comment

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

хорошее использование однострочного оператора)


if expr_lst[1] == '+': print(f"Result of {input_expr} = {addition(float(expr_lst[0]), float(expr_lst[2]))}")
elif expr_lst[1] == '-': print(f"Result of {input_expr} = {addition(float(expr_lst[0]), float(expr_lst[2]))}")
elif expr_lst[1] == '*': print(f"Result of {input_expr} = {multiplication(float(expr_lst[0]), float(expr_lst[2]))}")

Choose a reason for hiding this comment

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

отрицаем отрицание)
опечатка - подставили не ту функцию (повтор addition). калькулятор работает не корректно.

return (a - b)

def main():
operators = ["+", "-", "*", "/"]

Choose a reason for hiding this comment

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

в итоге, вы это нигде не используете operators

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.

5 participants