vel eval(input("enter the initial velocity (in meters/sec)") eval(input("enter the initial height (in meters)")time eval(input("enter the time interval between position calculations")convert angle to radians theta radians(angleset the initial position and velocities in and directions xpos ypos xvel vel cos(thetayvel vel sin(thetaloop until the ball hits the ground while ypos > calculate position and velocity in time seconds xpos xpos time xvel yvel yvel time ypos ypos time (yvel yvel )/ yvel yvel print("\ndistance traveled{ : fmeters format(xpos)modularizing the program you may have noticed during the design discussion that employed stepwise refinement (top-down designto develop the programbut did not divide the program into separate functions we are going to modularize the program in two different ways firstwe'll use functions ( la top-down designwhile the final program is not too longit is fairly complex for its length one cause of the complexity is that it uses ten variablesand that is lot for the reader to keep track of let' try dividing the program into functional pieces to see if that helps here' version of the main algorithm using helper functionsdef main()anglevelh time getinputs(xposypos xvelyvel getxycomponents(velanglewhile ypos > xposyposyvel updatecannonball(timexposyposxvelyvelprint("\ndistance traveled{ : fmeters format(xpos)it should be obvious what each of these functions does based on their names and the original program code you might take couple of minutes to code the three helper functions