This Looks Like a Job For


Error messages -
Traceback (most recent call last):
File "python", line 20, in
File "python", line 17, in full_time_wage
TypeError: calculate_wage() takes exactly 2 arguments (3 given)

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

Add your code below!

class PartTimeEmployee(Employee):
def calculate_wage(self,hours):
return hours*12

def full_time_wage(self,hours):
    return super(PartTimeEmployee,self).calculate_wage(self,hours)

print milton.full_time_wage(10)

Anyone can tell me what's the problem?



return super(PartTimeEmployee,self).calculate_wage(self,hours)

no need to supply self when calling calculate_wage


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.