object-oriented programming def __init__(selfc )self self def __call__(selfx)return self self * def table(selflrn)"""return table with points for < < "" 'for in np linspace(lrn) self(xs + '{ : { : }\nreturn we see that we have equipped the class with standard constructora __call__ special method for evaluating the linear functionand method table for writing table of and values say we now want to write similar class for evaluating parabola the code could look like class paraboladef __init__(selfc )self self self def __call__(selfx)return self * ** self * self def table(selflrn)"""return table with points for < < "" 'for in linspace(lrn) self(xs + '{ : { : }\nreturn we observe that the two classes are nearly identicaldiffering only in the parts that involve although we could very quickly just copy all the code from the line class and edit the small parts that are neededsuch duplication of code is usually bad idea at some pointwe may need change the codefor instanceto correct an error or improve the functionalityand having to make the same change in multiple places often leads to time-consuming errors sois there way we can utilize the class line code in parabola without resorting to copying and pastingthis is exactly what inheritance is about to introduce inheritancelet us first look at the following class definitionclass parabola(line)pass here pass is just python keyword that can be used wherever python expects to find codebut we do not want to define anything soat first sightthis parabola class seems to be emptybut notice the class definition class