Why doesn't it work?



NOTE : I tried removing object in my_car and putting "DeLorean" , "silver" , 88

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

OUTPUT : new
Traceback (most recent call last):
File "python", line 8, in
TypeError: init() takes exactly 3 arguments (2 given)


uhm... are you trying to pass the exercise or are you trying to learn by trail and error?

I highly recommend you to revisit some of the earlier exercises, this code looks weird


I didn't read the instructions properly but it still let me go through the last one so I thought it was ok :confused: sry


that is weird, it shouldn't have let you through. Please read the instructions (from earlier exercises) and try again, because this code will make it really difficult to pass the exercise


I did, it worked thanks for helping



you are welcome