14/19 This looks like a job for




This is the error message I'm getting:
Traceback (most recent call last):
File "python", line 20, in
TypeError: full_time_wage() takes exactly 2 arguments (1 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):
        self.hours = hours
        return hours * 12
    def full_time_wage(self, hours):
        return super(PartTimeEmployee, self).calculate_wage(self, hours)
milton = PartTimeEmployee("employee")
print milton.full_time_wage()


milton.full_time_wage() takes two arguments, self and hours. When you run
print milton.full_time_wage() it has the first argument of self, but it is missing the hours argument. Try running that print statement but pass some hours to the full_time_wage() method by including them between the parenthesis.


Did it change after giving hours? I'm still getting error. What should exactly should be there within the paranthesis? I used print milton.full_time_wage(10) .
But getting error


Your print statement is correct, you should have 10 between the parentheses. I think what is throwing the error is having the extra self in return super(PartTimeEmployee, self).calculate_wage(self, hours)

Try removing self from .calculate_wage(self, hours)


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