Asg3 Problem 1 script for calculating network measures