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
Owner

No description provided.

def print_test_case_info(self):
super().print_test_case_info()
print(f"\nПредусловие: {self.precondition}"
f"\nОкружение: {self.environment}")
Copy link

Choose a reason for hiding this comment

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

Отлично: нет дублирования полей которые уже описаны на уровне класса

else:
points = 101 - place

return points
Copy link

Choose a reason for hiding this comment

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

отлично: нет дублирования ретёрнов, корректная работа с условиями

task_3.py Outdated
class TotalPoints(PointsForPlace, PointsForMeters):

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

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

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

def total_points(self):
return f'Общее количество очков: {2 * self.victories + self.draws}'
Copy link

Choose a reason for hiding this comment

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

отлично: корректная работа с экземплярами класса, все расчёты верные

cls.hourly_payment = hourly_payment

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

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