throughout this and have lots of time to get used to it at we define class called dog by conventioncapitalized names refer to classes in python the parentheses in the class definition are empty because we're creating this class from scratch at we write docstring describing what this class does the __init__(method function that' part of class is method everything you learned about functions applies to methods as wellthe only practical difference for now is the way we'll call methods the __init__(method at is special method python runs automatically whenever we create new instance based on the dog class this method has two leading underscores and two trailing underscoresa convention that helps prevent python' default method names from conflicting with your method names we define the __init__(method to have three parametersselfnameand age the self parameter is required in the method definitionand it must come first before the other parameters it must be included in the definition because when python calls this __init__(method later (to create an instance of dog)the method call will automatically pass the self argument every method call associated with class automatically passes selfwhich is reference to the instance itselfit gives the individual instance access to the attributes and methods in the class when we make an instance of dogpython will call the __init__(method from the dog class we'll pass dog( name and an age as argumentsself is passed automaticallyso we don' need to pass it whenever we want to make an instance from the dog classwe'll provide values for only the last two parametersname and age the two variables defined at each have the prefix self any variable prefixed with self is available to every method in the classand we'll also be able to access these variables through any instance created from the class self name name takes the value stored in the parameter name and stores it in the variable namewhich is then attached to the instance being created the same process happens with self age age variables that are accessible through instances like this are called attributes the dog class has two other methods definedsit(and roll_over( because these methods don' need additional information like name or agewe just define them to have one parameterself the instances we create later will have access to these methods in other wordsthey'll be able to sit and roll over for nowsit(and roll_over(don' do much they simply print message saying the dog is sitting or rolling over but the concept can be extended to realistic situationsif this class were part of an actual computer gamethese methods would contain code to make an animated dog sit and roll over if this class was written to control robotthese methods would direct movements that cause dog robot to sit and roll over classes