Calculate perimeter and area of a polygon graphed in the coordinate plane (limiting to polygons in which consecutive vertices have the same x-coordinate or the same y-coordinate).