Hi! It keeps on telling me that I have entered 5 parameters and only four are needed, but I'm pretty sure I only entered four lol. I must have messed up somewhere
Shell error message:
Traceback (most recent call last):
File "python", line 25, in
TypeError: init() takes exactly 4 arguments (5 given)
CodeAcademy error message:
Oops, try again. my_car does not appear to be an instance of ElectricCar.
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." %(my_car.color, my_car.model, str(my_car.mpg)) def drive_car(self): self.condition = "used" my_car = Car("DeLorean", "silver", 88) print my_car.condition print my_car.drive_car() print my_car.condition class ElectricCar(Car): def __init__(self, model, color, mpg, battery_type): Car.__init__(self, model, color, mpg) self.battery_type = battery_type my_car = Car("Volvo", "navy", 89, "molten salt")
Thanks! I appreciate any help!