python program with library function but first warningthere are many things that must come together in the right way for ball py to run correctly on your computer there might be problems with your python installationwith your writing of the program (it is very easy to introduce errors!)or with the location of the filejust to mention some of the most common difficulties for beginners fortunatelysuch problems are solvableand if you do not understand how to fix the problemask somebody typicallyonce you are beyond these common start-up problemsyou can move on to learn programming and how programs can do lot of otherwise complicated mathematics for you we describe the first steps using the spyder graphical user interface (gui)but you can equally well use standard text editor for writing the program and terminal window (terminal on macpower shell on windowsfor running the program start up spyder and type in each line of the program ball py shown earlier then run the program more detailed descriptions of operating spyder are found in appendix if you have had the necessary luck to get everything rightyou should now get the number out in the rightmost lower window in the spyder gui if socongratulationsyou have just executed your first self-written computer program in pythonand you are ready to go on studying this bookyou may like to save the program before moving on (filesave as python program with library function imagine you stand on distancesay awaywatching someone throwing ball upwards straight line from you to the ball will then make an angle with the horizontal that increases and decreases as the ball goes up and down let us consider the ball at particular moment in timeat which it has height of what is the angle of the line thenagainthis could easily be done with calculatorbut we continue to address gentle mathematical problems when learning to program before thinking of writing programone should always formulate the algorithmi the recipe for what kind of calculations that must be performed hereif the ball is away and up in the airit makes an angle with the groundwhere tan = the angle is then tan =xlet us make python program for doing these calculations we introduce names and for the position data and yand the descriptive name angle for the angle the program is stored in file ball_angle_first_try pyx horizontal position vertical position angle atan( /xprint (angle/pi)* before we turn our attention to the running of this programlet us take look at one new thing in the code the line angle atan( / )illustrates how the function atancorresponding to tan in mathematicsis called with the ratio