This Looks Like a Job For


Traceback (most recent call last):
File "python", line 19, in
File "python", line 16, in full_time_wage
AttributeError: 'super' object has no attribute 'caculate_wage'

what's problem
please could any one help me?

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).caculate_wage(self,hours)
milton = PartTimeEmployee('milton')
print milton.full_time_wage(10)




ok thx alot :see_no_evil:


and when you define full_time wage in the super call you should put .calculate_wage(hours) because you don't need self


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