The eat and run functions are methods because they are defined within a class. Both methods take the argument self, which means that these functions will take the object instances of this class, as a parameter.
An object is an instance of a class.
Let's instantiate the Monkey class, making an object called pedro:
pedro is now an object of class Monkey, which means that we can execute its eat and run methods:
Notice that we use the dot operator . to call the object's methods. Also, we don't need to include a parameter -- since we specified self as the argument, the object pedro is used as a parameter automatically. Neat.
The Constructor Method
The constructor method, __init__, is used to initialize data, and it runs as soon as an object is instantiated.