the first few steps / as input parameter or argument the atan function takes one argumentand the computed value is returned from atan this means that where we see atan( / ) computation is performed (tan = /and the result "replacesthe text atan( /xthis is actually no more magic than if we had written just /xthen the computation of / would take placeand the result of that division would replace the text / thereafterthe result is assigned to the name angle on the left-hand side of note that the trigonometric functionssuch as atanwork with angles in radians the return value of atan must hence be converted to degreesand that is why we perform the computation (angle/pi)* two things happen in the print statementfirstthe computation of (angle/pi)* is performedresulting in real numberand secondprint prints that real number againwe may think that the arithmetic expression is replaced by its results and then print starts working with that result if we next execute ball_angle_first_try pywe get an error message on the screen saying nameerrorname 'atanis not defined warningfailure executing filewe have definitely run into troublebut whywe are told that name 'atanis not defined so apparently python does not recognize this part of the code as anything familiar on pocket calculator the inverse tangent function is straightforward to use in similar way as we have written in the code in pythonhoweverthis function has not yet been imported into the program lot of functionality is available to us in programbut much more functionality exists in python librariesand to activate this functionalitywe must explicitly import it in pythonthe atan function is grouped together with many other mathematical functions in the library called math such library is referred to as module in correct python language to get access to atan in our program we have to write from math import atan inserting this statement at the top of the program and rerunning itleads to new problempi is not defined the variable pirepresenting is also available in the math modulebut it has to be imported toofrom math import atanpi it is tedious if you need quite some math functions and variables in your programe also sincoslogexpand so on quick way of importing everything in math at onceis from math import