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.


class PartTimeEmployee(Employee):
    calculate_wage(self, hours)

calculate_wage is a method defined on the super class. Do you know how to access super methods?


No, and It's still giving me the same results. Can you show me the full code so I can compare? I tried that bit, but it still didn't work. Thank you for replying, by the way.


Nevermind, I've got it, thank you for replying.


4 posts were split to a new topic: 12/18