I'm stuck on Referring to member variables. I feel like I may have missed a step or something.
I get this error message (note that the formatting on here has changed where the arrow is pointing, it is actually under the second underscore after init in the actual error message):
File "python", line 2
def __ init__(self, model, color, mpg):
SyntaxError: invalid syntax
And because of this Codeademy says: Oops, try again. Make sure you define your own init() function.
What have i missed or gone wrong with?
class Car(object): def __ init__(self, model, color, mpg): self.model = model self.color = color self.mpg = mpg condition="new" my_car=Car("DeLorean", "silver", 88) print my_car.model print my_car.color print my_car.mpg