Why cannot this code pass?
I changed the last code into:
Then changed to
return super(PartTimeEmployee, self).calculate_wage(hours)
Then I can pass.
But I don't understand why.
The following is my original code:
class Employee(object): """Models real-life employees!""" def __init__(self, employee_name): self.employee_name = employee_name def calculate_wage(self, hours): self.hours = hours return hours * 20.00 class PartTimeEmployee(Employee): def calculate_wage(self, hours): self.hours=hours return hours*12.00 def full_time_wage(self, hours): self.hours=hours return super(PartTimeEmployee, self).calculate_wage(self,hours) milton=PartTimeEmployee("Milton") print full_time_wage(milton,4)