7/11 syntax error but where?


it says that I have a syntax error on line 10. The definition of the my_car, it keeps asking me if I accidentally deleted my_car. Where have I gone wrong.

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()


on this line

you have to add another parenthesis

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

and it will work


thank you so much, slightly kicking myself that I missed it.


thanks rydan..glad you can help us..:yum: