In Python Make a new class called Electric_Car which posses all the methods and attributes of the Car class. In addition set a new attribute called charge_count that starts from 0 for any newly constructed electric car. Write a new method called charge() that each time we call it for a given electric car, updates the charge_count by adding 1 unit. Now construct a new electric car instance with following attributes: Make: Tesla; Model: s; Year: 2018. Call the trip() method to update odometer with a trip of 200 miles. Also call the charge() method to update the charge count twice.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here