procedural vs object-oriented programming one good way of describing something new is to compare it with something old most atmospheric and oceanic scientists have had experience with procedural programmingso we'll start there procedural programs look at the procedural world in terms of two entities"dataand "functions in procedural conprograms have data and textthe two entities are separate from each other function takes data as functions as input and returns data as output additionallythere' nothing customizable separate about function with respect to data as resultthere are no barriers to entities using function on various types of dataeven inappropriately in the real worldhoweverwe don' think of things or objects as having these two features (data and functionsas separate entities that isreal world objects are not (usuallymerely data nor merely functions real world real world objects have objects instead have both "stateand "behaviors for instancepeople have states and state (tallshortetc and behavior (playing basketballrunningetc )often behaviors both at the same timeandof coursein the same person the aim of object-oriented programming is to imitate this in terms of softwareso that "objectsin software have two entities attached to themstates and behavior this makes the conceptual leap from real-world to programs (hopefullyless of leap and more of step as resultwe can more easily implement ideas into instructions computer can understand the nuts and bolts of objects what do objects consist ofan object in programming is an entity or "variablethat has two entities attached to itdata and things that act on that data the data are called attributes of the objectand the functions attached to the object that can act on the data are called methods of the object importantlyobjects are made up of you design these methods to act on the attributesthey aren' random funcattributes and tions someone has attached to the object in contrastin procedural programmethods mingvariables have only one set of datathe value of the variablewith no functions attached to the variable how are objects definedin the real worldobjects are usually examples or specific realizations of some class or type for instanceindividual people are specific realizations of the class of human beings the specific reobject instances are alizationsor instancesdiffer from one another in details but have the same specific pattern for peoplewe all have the same general shapeorgan structureetc realizations of in oopthe specific realizations are called object instanceswhile the coma class mon pattern is called class in pythonthis common pattern or template is defined by the class statement