to work with the attribute age in our first print statementmy_dog name title(makes 'willie'the value of my_dog' name attributestart with capital letter in the second print statementstr(my_dog ageconverts the value of my_dog' age attributeto string the output is summary of what we know about my_dogmy dog' name is willie my dog is years old calling methods after we create an instance from the class dogwe can use dot notation to call any method defined in dog let' make our dog sit and roll overclass dog()--snip-my_dog dog('willie' my_dog sit(my_dog roll_over(to call methodgive the name of the instance (in this casemy_dogand the method you want to callseparated by dot when python reads my_dog sit()it looks for the method sit(in the class dog and runs that code python interprets the line my_dog roll_over(in the same way now willie does what we tell him towillie is now sitting willie rolled overthis syntax is quite useful when attributes and methods have been given appropriately descriptive names like nameagesit()and roll_over()we can easily infer what block of codeeven one we've never seen beforeis supposed to do creating multiple instances you can create as many instances from class as you need let' create second dog called your_dogclass dog()--snip-my_dog dog('willie' your_dog dog('lucy' print("my dog' name is my_dog name title("print("my dog is str(my_dog ageyears old "my_dog sit(classes