I stuck at this exercise:
Error is NameError: name 'self' isn't defined and "Oops, try again. my_car does not appear to be an instance of ElectricCar."
I don't understand what I do wrong. Please, help me.
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, 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 class ElectricCar(Car): def __init__(self,battery_type): self.battery_tyoe = battery_type super(ElectricCar, self).__init__(model, color, mpg) my_car = ElectricCar("DeLorean", "Red", 15, "molten salt")