Change the class so that self.seniority defaults to 1 and self.intlawards = 2 class Designer(Employee): def __init__(self, name, seniority, awards): super().__init__(name, seniority) self.intlawards = awards def check_if_it_is_time_for_upgrade(self): # for each accreditation, increase the counter by 1 # for now we assume that all designers are accredited self.seniority += 1 # condition for promoting an employee from the presentation if (self.seniority) + (self.intlawards*2) % 7 == 0: self.grade_up() # publication of the results return self.publish_grade()
class Designer(Employee): def __init__(self, name, seniority, awards=2): super().__init__(name, seniority) self.intlawards = awards def check_if_it_is_time_for_upgrade(self): # for each accreditation, increase the counter by 1 # for now we assume that all designers are accredited self.seniority += 1 # condition for promoting an employee from the presentation if (self.seniority) + (self.intlawards*2) % 7 == 0: self.grade_up() # publication of the results return self.publish_grade()