14/19


#1

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
print hours * 12.00

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

milton = PartTimeEmployee("milton")
print milton.full_time_wage(10)

I don't know why there is an error. Could somebody help me please


#2

Maybe it does not like the print hours you have? I double checked your code with mine and they look the same to me. Good luck!

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(PartTimeEmployee, self).calculate_wage(hours)

milton = PartTimeEmployee("Milton")
print milton.full_time_wage(10)


#3

I deleted the part with print hours..., and it didn't work anyway


#4

Bummer, sorry... What is the error you are receiving?


#5

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


#6

File "python", line 3
def init(self, employee_name):
^
IndentationError: expected an indented block


#7

The error gives you the answer. You need to indent your def __init__


#8

milton = PartTimeEmployee("Milton")
print milton.full_time_wage(10)

Could it be the capital "M" in 'Milton" in the lines above?
When you print the result of calling his method this would seem to be an issue. Good Luck!


#9

thanks..it's a good code you have..:grin: