Wrote the avgNumber() function.