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): calculate_wage(self, hours) self.hours = hours print bob.calculated_wage(10)
I'm having a lot of trouble with this section. So, when I hit save and submit code, it returns this:
Traceback (most recent call last): File "python", line 14, in <module> File "python", line 15, in PartTimeEmployee NameError: name 'calculate_wage' is not defined
I'll have to go over this section again.