Possibly over-complicated solution to problem 6.
Wasn't actually using the numbers passed to the first diff_ssq function. But just built-in sum works better.
Problem 7.
Problem 6 has a closed form solution.