Get Rg From Coordinates

Get Radius Etc. from 2D Coordinates
Here are some coordinates for a two-dimensional polymer made up of 20 identical beads.
0,0; 1,-2; 0,4; -2,2; -4,0; -2,-2; -4,-4; -2,-4; 0,-4; 2,-6; 4,-4; 2,-2; 0,-2; 2,0; 4,-2; 6,0; 4,2;
6,4; 4,6; 2,4.
Plot these points using a connect-the-dots plot to show what this crazy, two-dimensional polymer
looks like.
Compute the contour length (sum of absolute value of all bond lengths), the end-to-end distance,
and the radius of gyration. Now repeat the computation for a shorter polymer containing just the
first ten beads in the same locations. You could do this by hand, but it would be more fun to
write a little program to it. It must be possible to get Excel to find this answer, too, if you are
programming-shy. Show your work.
I will award 5 bonus points for anyone who does it with a real program, not just Excel.
Plot pts
Contour Length
Repeat shorter
Real Program
/5 extra