{"identifier":52417,"topic":"Functions","name":"average","text":"<code>average(<i>numberList<\/i>)<\/code> <br><br>\n\n Value returned:  number equal to the arithmetic average of the comma- separated list of numbers <br>\n","related":{"89523":"Arithmetic operators","57627":"max","58185":"min"},"examples":"average(1,2,3,4,5,6,7,8,9,10)\n\nrepeat with N = 1 the number of lines of field \"Number Data\"\n  put line N of field \"Number Data\" into item N of theNumbers\nend repeat\nput average(theNumbers)","demo":"<code><pre>on onAverage\n  repeat with numLine = 1 to the number of lines of me\n    put the number of words of line numLine of me into\u00ac\n    item numLine of wordsInEachLine\n  end repeat\n  put \"There are an average of\" && <b>average<\/b>(wordsInEachLine) && \u00ac\n  \"words in each line of this field.\" into sayIt\n  answer sayIt\nend onAverage<\/pre><\/code>\n ","debug":{"9":["average(numberList)\r"]}}