Finding Perimeter and Area of 2-D shapes