Got errors in console but i got pass what is the problem


#1


#2

You have to put the definition of __init__ inside of the class definition.

The error is because you use a variable called model that you never defined. If you define a variable inside of a class definiton it is only available inside of the class, not gloabaly.

Your class should look like this:

class Car(object):
    def __init__(self,model,color,mpg):
        self.model = model
        self.color = color
        self.mg = mpg

#3

thanks so much

get confused with the code becoming longer and longer..........


#4

No problem, I think this might help you: