Oops, try again. Make sure you've defined a new ElectricCar class after defining Car


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/python-intermediate-en-egNXj/1/3

<In what way does your code behave incorrectly? Include ALL error messages.>
I have reviewed my code too many times and cannot figure out what is causing this error to happen. Anyone to the rescue?

<What do you expect to happen instead?>

```python

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

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

class EletricCar(Car):
def init(self, model, color, mpg, battery_type):
self.model = model
self.color = color
self.mpg = mpg
self.battery_type = battery_type

my_car = EletricCar(“Camaro”, “yellow”, 77, “molten salt”)

<do not remove the three backticks above>

#2

Just found out what the problem is: I misspelled the inherited class name.


#3

it’s ElectricCar not EletricCar