14/18 This Looks Like a Job For


#1

My code passes the checks but does not print the correct answer. I cant see what the problem is but i get this error:

bound method PartTimeEmployee.full_time_wage of PartTimeEmployee object at 0x7ffa870a8050
None

My Code is Below:

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

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


#2

Look at the very last line. You are printing information about the method "milton.full_time_wage" instead of printing the return value of the method. You want something like this instead:

print milton.full_time_wage(40)

#3

Ha Hah well that makes sense!

Thankyou


#4

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


#5

milton.full_time_wage needs arguments to be passed
So try milton.full_time_wage(20) or something


What is wrong with my code?