Skip to content

HW_Kravchenko#14

Open
MariiaKaar wants to merge 19 commits intoPython-BI-2024-25:mainfrom
MariiaKaar:HW_Kravchenko
Open

HW_Kravchenko#14
MariiaKaar wants to merge 19 commits intoPython-BI-2024-25:mainfrom
MariiaKaar:HW_Kravchenko

Conversation

@MariiaKaar
Copy link

No description provided.

Copy link

@IvanKozlov98 IvanKozlov98 left a comment

Choose a reason for hiding this comment

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

Привет, есть небольшие недочеты по коду, но, в целом, отличная работа!

  1. Обратите внимание на правила написания сообщений коммитов. Например, они должны начинаться с большой буквы
  2. Файлы задания удалять не стоит :)

Оценка:
За функции: 78/80 баллов
За README: 10/10 баллов
За коммиты и правильную структуру форков: 10/10

10 доп.
Итого: (98+10)/100 баллов

def sum_lesha(a, b):
"""Функция сложения"""
return(a + b)
def minus(a, b) :

Choose a reason for hiding this comment

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

названия переменных как-то должны подчеркивать -- что это числа - a,b - могут быть в теории чем угодно. Самое близкое к желаемому num1, num2

return(a + b)
def minus(a, b) :
"""Функция вычитания"""
return(a-b)

Choose a reason for hiding this comment

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

операнды в математических операциях принято разделять запятыми

Suggested change
return(a-b)
return(a - b)

Comment on lines +22 to +24
if len(parts) != 3:
print("Ошибка: неверный формат выражения!")
return

Choose a reason for hiding this comment

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

отлично!
пользователям не стоит доверять!

Comment on lines +13 to +14
return(a + b)
def minus(a, b) :

Choose a reason for hiding this comment

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

функции между собой принято разделять, по крайней мере, одной пустой строкой

"""Функция умножения"""
return(a * b)

def sum_lesha(a, b):

Choose a reason for hiding this comment

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

подходящее название для функции add/sum..
github и так видит, что данную функцию добавил Алексей :)
-2 балла

return "Ошибка: Деление на ноль!"
return a / b

def p_multiply (a, b):

Choose a reason for hiding this comment

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

почему не просто multiply ?

def divide(a, b):
"""Функция для деления"""
if b == 0:
return "Ошибка: Деление на ноль!"

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.

4 participants