def describe_battery(self)"""print statement describing the battery size ""print("this car has str(self battery_size"-kwh battery "class electriccar(car)"""represent aspects of carspecific to electric vehicles "" def __init__(selfmakemodelyear)""initialize attributes of the parent class then initialize attributes specific to an electric car ""super(__init__(makemodelyearself battery battery(my_tesla electriccar('tesla''model ' print(my_tesla get_descriptive_name()my_tesla battery describe_battery(at we define new class called battery that doesn' inherit from any other class the __init__(method at has one parameterbattery_sizein addition to self this is an optional parameter that sets the battery' size to if no value is provided the method describe_battery(has been moved to this class as well in the electriccar classwe now add an attribute called self battery this line tells python to create new instance of battery (with default size of because we're not specifying valueand store that instance in the attribute self battery this will happen every time the __init__(method is calledany electriccar instance will now have battery instance created automatically we create an electric car and store it in the variable my_tesla when we want to describe the batterywe need to work through the car' battery attributemy_tesla battery describe_battery(this line tells python to look at the instance my_teslafind its battery attributeand call the method describe_battery(that' associated with the battery instance stored in the attribute the output is identical to what we saw previously tesla model this car has -kwh battery