I have to write a program to calculate the least squares line from a set of data. I named the file "data.txt" and these are the contents:

-0.9 -1.1
-0.01 0.23
1.1 1.3
2.0 2.0
-2.0 -1.85

...