Change this function so that the employee's awards are also taken into account (add this variable to the class) and the employee's promotion condition is taken into account by the formula if (self.seniority)+(self.intlawards*2) % 7 == 0: self.grade_up() class Developer(Employee): def __init__(self, name, seniority): super().__init__(name, seniority) def check_if_it_is_time_for_upgrade(self): # for each accreditation, increase the counter by 1 # for now we assume that all of the developers pass the accreditation self.seniority += 1 # condition of promoting an employee from the presentation if self.seniority % 5 == 0: self.grade_up() # publication of the results return self.publish_grade()
def check_if_it_is_time_for_upgrade(self): if (self.seniority)+(self.intlawards*2) % 7 == 0: self.grade_up() return self.publish_grade()