7/11 - Returning an error


#1

My code is returning an error but I can't understand why.
here is what I have:

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

def display_car(self):
    return 'This is a %s %s with %s MPG' % (self.color, self.model, str(self.mpg)

my_car = Car("DeLorean", "silver", 88)

print my_car.display_car()


error returned: File "python", line 11
my_car = Car("DeLorean", "silver", 88)
^
SyntaxError: invalid syntax


I don't understand what is wrong with the my_car line which is returning the error... (the formatting is showing up strange here, but the indentation should be correct)


#2

Hi @digitalcoder99109 ,

You are missing a closing parenthesis at the end of this line ...

return 'This is a %s %s with %s MPG' % (self.color, self.model, str(self.mpg)