the sample code at the end of the preceding example shows how to call method with argumentssimply include the arguments inside the parenthesesand use the same dot notation to access the method just picked some random positions to test the methods the test code calls each method and prints the results on the console the assert function is simple test toolthe program will bail if the statement after assert is false (or zeroemptyor nonein this casewe use it to ensure that the distance is the same regardless of which point called the other point' calculate_ distance method initializing the object if we don' explicitly set the and positions on our point objecteither using move or by accessing them directlywe have broken point with no real position what will happen when we try to access itwelllet' just try it and see "try it and seeis an extremely useful tool for python study open up your interactive interpreter and type away the following interactive session shows what happens if we try to access missing attribute if you saved the previous example as file or are using the examples distributed with the bookyou can load it into the python interpreter with the command python - filename pypoint point(point print(point print(point ytraceback (most recent call last)file ""line in attributeerror'pointobject has no attribute 'ywellat least it threw useful exception we'll cover exceptions in detail in expecting the unexpected you've probably seen them before (especially the ubiquitous syntaxerrorwhich means you typed something incorrectly!at this pointsimply be aware that it means something went wrong the output is useful for debugging in the interactive interpreterit tells us the error occurred at line which is only partially true (in an interactive sessiononly one line is executed at timeif we were running script in fileit would tell us the exact line numbermaking it easy to find the offending code in additionit tells us the error is an attributeerrorand gives helpful message telling us what that error means