Create corr function

Create corr function. Possible rounding error when compared to sample
output from assignment page.