object-oriented programming the object-oriented approach ||in this section we will look at some of the problems of purely procedural approach by considering situation where we need to represent circlespotentially lots of them the minimum data required to represent circle is its (xyposition and its radius one simple approach is to use -tuple for each circle for examplecircle ( one drawback of this approach is that it isn' obvious what each element of the tuple represents we could mean (xyradiusorjust as easily(radiusxyanother drawback is that we can access the elements by index position only if we have two functionsdistance_from_origin(xyand edge_distance_from_origin(xyradius)we would need to use tuple unpacking to call them with circle tupledistance distance_from_origin(*circle[: ]distance edge_distance_from_origin(*circleboth of these assume that the circle tuples are of the form (xyradiuswe can solve the problem of knowing the element order and of using tuple unpacking by using named tupleimport collections circle collections namedtuple("circle"" radius"circle circle( distance distance_from_origin(circle xcircle ythis allows us to create circle -tuples with named attributes which makes function calls much easier to understandsince to access elements we can use their names unfortunatelyproblems remain for examplethere is nothing to stop an invalid circle from being createdcircle circle( - it doesn' make sense to have circle with negative radiusbut the circle named tuple is created here without raising an exception--just as it would be if the radius was given as variable that held negative number the error will be noticed only if we call the edge_distance_from_origin(function--and then only if that function actually checks for negative radius this inability to validate when creating an object is probably the worst aspect of taking purely procedural approach if we want circles to be mutable so that we can move them by changing their coordinates or resize them by changing their radiuswe can do so by using the private collections namedtuple _replace(method