identifying objects is very important task in object-oriented analysis and programming but it isn' always as easy as counting the nouns in short paragraphas we've been doing rememberobjects are things that have both data and behavior if we are working only with datawe are often better off storing it in listsetdictionaryor some other python data structure (which we'll be covering thoroughly in python data structureson the other handif we are working only with behaviorbut no stored dataa simple function is more suitable an objecthoweverhas both data and behavior proficient python programmers use built-in data structures unless (or untilthere is an obvious need to define class there is no reason to add an extra level of abstraction if it doesn' help organize our code on the other handthe "obviousneed is not always self-evident we can often start our python programs by storing data in few variables as the program expandswe will later find that we are passing the same set of related variables to set of functions this is the time to think about grouping both variables and functions into class if we are designing program to model polygons in twodimensional spacewe might start with each polygon being represented as list of points the points would be modeled as two-tuples (xydescribing where that point is located this is all datastored in set of nested data structures (specificallya list of tuples)square [( , )( , )( , )( , )nowif we want to calculate the distance around the perimeter of the polygonwe simply need to sum the distances between the two points to do thiswe also need function to calculate the distance between two points here are two such functionsimport math def distance( )return math sqrt(( [ ]- [ ])** ( [ ]- [ ])** def perimeter(polygon)perimeter points polygon [polygon[ ]for in range(len(polygon))perimeter +distance(points[ ]points[ + ]return perimeter nowas object-oriented programmerswe clearly recognize that polygon class could encapsulate the list of points (dataand the perimeter function (behaviorfurthera point classsuch as we defined in objects in pythonmight encapsulate the and coordinates and the distance method the question isis it valuable to do this