Methods - Structure that does not make sense to me

Hi, the Class and methods do not click with me. The code and rationale of having it this way do not fit my structured thinking at all. I would be grateful if someone can simplify the structure of Class and methods, maybe it will click. Taking an example from the training itself.
class Dog:

dog_time_dilation = 7

def time_explanation(self):

print("Dogs experience {} years for every 1 human year.".format(self.dog_time_dilation))

pipi_pitbull = Dog()


What does this code really mean???!!!

The code creates a class called Dog, with one property dog_time_dilation with a value of 7, and a method time_explanation(), which prints how dogs experience time. You then create an instance of the Dog class and save it to pipi_pitball. Then you call the time_explanation() method.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.