Calculate Average

In this example I defined theAns outside the function which made it global. I defined theAvg inside the function and then assigned the results to theAvg as I left the function. Since it is global I can then see it.