This Looks Like a Job For


#1



https://www.codecademy.com/en/courses/python-intermediate-en-WL8e4/2/4?curriculum_id=4f89dab3d788890003000096#


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):
        self.hours=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)


#2

spelling


#3

ok thx alot :see_no_evil:


#4

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


#6

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