one single return statement be prepared for critical comments if you return wherever you want an expression you will often encounter when dealing with programmingis main programor that some code is in main this is nothing particular to pythonand simply refers to that part of the program which is outside functions howevernote that the def line of functions is counted into main soin ball_function py aboveall statements outside the function are in mainand also the line def ( ) function may take no argumentsor manyin which case they are just listed within the parentheses (following the function nameand separated by comma let us illustrate take slight variation of the ball example and assume that the ball is not thrown straight upbut at an angleso that two coordinates are needed to specify its position at any time according to newton' laws (when air resistance is negligible)the vertical position is given by td : gt and the horizontal position by td we can include both these expressions in new version of our program that prints the position of the ball for chosen times assume we want to evaluate these expressions at two points in timet : and : we can pick some numbers for the initial velocity components and xname the program ball_position_xy pyand write it for example as def ( yt) acceleration of gravity return * * * ** def ( xt)return * initial_velocity_x initial_velocity_y time just pick one point in time print (initial_velocity_xtime) (initial_velocity_ytimetime pick another point in time print (initial_velocity_xtime) (initial_velocity_ytimenow we compute and print the two components for the positionfor each of the two chosen points in time notice how each of the two functions now takes two arguments running the program gives the output function may also have no return valuein which case we simply drop the return statementor it may return more than one value for examplethe two functions we just defined could alternatively have been written as onedef xy( xv yt) acceleration of gravity return *tv * * * **