Learn

Since our ElectricCar is a more specialized type of Car, we can give the ElectricCar its own drive_car() method that has different functionality than the original Car class’s.

Instructions

1.

Inside ElectricCar add a new method drive_car that changes the car’s condition to the string "like new".

Then, outside of ElectricCar, print the condition of my_car

Next, drive my_car by calling the drive_car function

Finally, print the condition of my_car again

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?