subclasses each of these fish will have first names and last names in addition to characteristics let' add the methods swim(and swim_backwards(to the fish class so that every subclass will also be able to make use of these methods base classparent class class fishdef __init__(selfnoofeyes= last_name="fish")self noofeyes noofeyes self last_name last_name def swim(self)print("the fish is swimming "def swim_backwards(self)print("the fish can swim backwards " goldfish child class that subclasses the fish class will be able to make use of both the method swim(and swim_backwards(method declared in fish without needing to declare it the first line of child class looks little different than non-child classes as you must pass the parent class into the child class as parameterclass goldfish(fish)the goldfish class is child of the fish class we know this because of the inclusion of the word fish in parentheses with child classeswe can choose to add more methodsoverride existing parent methodsor simply accept the default parent methods with the pass keywordwhat we have done in this caseclass goldfish(fish)pass we can now create goldfish object without having to define any additional methods gf goldfish("terry"print(gf name gf last_name +"has "gf noofeyes ,"eyes"gf swim(gf swim_backwards(we have created goldfish object gf that makes use of each of the methods of the fish class even though we did not define those methods in the goldfish child class page