Get a syntax error but still lets me pass


#1



https://www.codecademy.com/courses/python-intermediate-en-egNXj/0/5?curriculum_id=4f89dab3d788890003000096#


i am allowed to pass but i get this error message "File "python", line 3
def__init__(self, model, color, mpg):
^
SyntaxError: invalid syntax"


please someone tell me what is wrong with the code


class Car(object):
    condition = "new"
    def__init__(self, model, color, mpg):
        self.model = model
        self.color = color
        self.mpg = color

my_car = Car("DeLorean", "silver", 88)
print my_car.condition


#2

Here:

It should be:

self.mpg = mpg

#3

wow i cant believe i missed that, that didnt fix it but i realised my mistake, i didnt put a space after def.


#4

Okay.

Good you saw that, too.

Have fun coding! :slight_smile: