#8 I'm getting tired of this


#1



I did the correct thing to the code:


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 %i MPG."' % (self.color, self.model, self.mpg)

def drive_car(self):
        self.condition = "used"

my_car = Car("DeLorean", "silver", 88)
print my_car.condition
my_car.drive_car()
print my_car.condition


But the problem is that it is giving me this error saying, "Oops, try again. Make sure your Car class has a drive_car() method." I already have my method. Could this be a bug?


#2

display_car and driver_car are at the moments functions, not methods.

Place them inside Car class to make them methods


#3

That worked! Thanks! I didn't noticed that.


#4