The sum of the interior angles of any polygon is given by (n-2)180°, where n is the number of sides.
Also sum of all the exterior angles of any polygon is 360°
Given (n-2)180° = 3(360°)
=> n-2 = 6
=> n = 8.
Hence the number of sides of a polygon is 8