Override - not recognising class


#1



https://www.codecademy.com/courses/python-intermediate-en-WL8e4/2/3?curriculum_id=4f89dab3d788890003000096#


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


#2

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

#3

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


#4

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