Right code but it will not go through. 6


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

my_car = Car("Delorean", "silver", 88)
print my_car.condition
print my_car.model
print my_car.color
print my_car.mpg


#2

@brettwhitley828 ,

Your formatting is incomplete, so we cannot check the indentation of your code. It might not be correct, but we cannot tell.

The model of my_car should be "DeLorean". You have "Delorean"


#3

There are no indents for the prints and i fixed the delorean part but that wasnt it


#4

Hi @brettwhitley828 ,

Is your initialization method named __init__? It appears as init in your code, which is incorrect. Also make sure to indent that method and the assignment of condition, so that they are part of the Car class definition.

The indentations and names in your code should be corrected to appear as in the following ...

class Car(object):
    condition = "new"
    def __init__(self, model, color, mpg):
        self.model = model
        self.color = color
        self.mpg = mpg
my_car = Car("DeLorean", "silver", 88)
print my_car.condition
print my_car.model
print my_car.color
print my_car.mpg