Changed sum and mean function

Changed sum to read an expression and calculate sum.
Changed mean to read an expression and calculate mean.
Improved mean to return floating point.