This Looks Like a Job For


#1


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

Oops, try again. Your code raised an exception, have a look at the console window for the error message!

Traceback (most recent call last):
File "python", line 20, in
File "python", line 16, in full_time_wage
NameError: global name 'PartTimeEmlpoyee' is not defined

I don't know what is wrong.


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.00
    def full_time_wage(self, hours):
        return super(PartTimeEmlpoyee, self).calculate_wage(hours)
        
milton = PartTimeEmployee("Milton")

print milton.full_time_wage(10)


#2

Hi @551266 ,

The name PartTimeEmlpoyee given here ...

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

... is undefined. It does not match the spelling of the name PartTimeEmployee that is specified here ...

class PartTimeEmployee(Employee):

#3

thanks, I spent around an hour and couldn't find this error, thanks!


#4