Skip to content

Sprint_2#1

Open
sergech9 wants to merge 2 commits intomainfrom
develop
Open

Sprint_2#1
sergech9 wants to merge 2 commits intomainfrom
develop

Conversation

@sergech9
Copy link
Copy Markdown
Owner

No description provided.

Comment thread task_1.py
def print_test_case_info(self):
super().print_test_case_info()
print(f"\nПредусловие: {self.precondition}"
f"\nОкружение: {self.environment}")
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 task_3.py
else:
points = 101 - place

return points
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 task_3.py Outdated
class TotalPoints(PointsForPlace, PointsForMeters):

def get_total_points(self, place, meters):
PointsForPlace = TotalPoints.get_points_for_place(place)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

get_points_for_place и .get_points_for_meters теперь методы TotalPoints после наследования, обращение к ним ведется через self

Comment thread task_5.py
return f'Хоккейных поражений: {self.losses}'

def total_points(self):
return f'Общее количество очков: {2 * self.victories + self.draws}'
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 task_4.py
cls.hourly_payment = hourly_payment

def salary(self):
return self.hours * self.hourly_payment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

отлично: корректная работа с классом через @classmethod

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