title: Trying to call back a function
body: <p>I'm trying to call back a function which creates a list of random numbers.  Then after that I want to take the mean of those random numbers.</p>
  
  <pre><code>    import random
      def randomNumbers(n):
          myList = []
          needMoreNumbers = True
          while (needMoreNumbers):
              randomNumber = int(random.random() * 10)
              myList.append(randomNumber)
              n = n -1
              if (n &lt; 1):
                  needMoreNumbers = False
          return myList
  </code></pre>
  
  <p>That's the first part of the code.
  Here's what I have next:</p>
  
  <pre><code>    import random
      def calculateAverage(n):
          return sum(mylist)/len(myList)
  </code></pre>
  
  <p>I also need to be able to print both functions.  </p>