Override - not recognising class



Oops, try again. Did you create a class called PartTimeEmployee?

I'm pretty sure this is right but in the window the 'PartTimeEmployee' string doesn't change color.

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):
    self.hours = hours
    return hours * 12.00


Have you had a look at the console when running your code? Sometimes you've got to make your own observations and tests.

$ python2 swiddison.py 
  File "swiddison.py", line 1
    Class Employee(object):
SyntaxError: invalid syntax


Thanks for your help I figured it out. I'm missing a line! def calculate_wage


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.