randRange( 5, 7 )
180 * ( SIDES - 2 ) {}

What is the sum of this polygon's interior angles?

init({ range: [ [ -5, 5 ], [ -1, 5 ] ], scale: [ 40, 40 ] }); graph.polygon = new Polygon( SIDES ); graph.polygon.draw(); CLONE = graph.polygon.clone();

There are a couple ways to approach this problem.

Does it help to remember that there are 180 degrees in a triangle?

Since this polygon has SIDES sides, we can draw SIDES triangles that all meet in the center.

We can combine all the triangles' angles, and then we must subtract 360 degrees because the circle in the middle is extra.

\begin{align*}&SIDES \times 180^{\circ} - 360^{\circ} \\ &= SIDES * 180^{\circ} - 360^{\circ} \\ &= ANSWER^{\circ}\end{align*}

An alternative approach is shown below.

We can use four of the cardinal( SIDES ) sides to make 2 triangles, as shown in orange.

init({ range: [ [ -5, 5 ], [ -1, 5 ] ] }); graph.polygon = CLONE; graph.polygon.draw(); graph.polygon.drawDiagonals( randRange( 0, SIDES - 1 ) );

There plural( "is", SIDES - 4 ) plural( SIDES - 4, "side" ) between the orange triangles, to make SIDES - 4 additional plural( "triangle", SIDES - 4 ).

We chopped this polygon into SIDES - 2 triangles, and each triangle's angles sum to 180 degrees.

SIDES - 2 \times 180^{\circ} = ANSWER^{\circ}

The sum of the polygon's interior angles is ANSWER degrees.

What is the sum of this polygon's exterior angles?

init({ range: [ [ -6, 6 ], [ -2, 7 ] ] }); graph.polygon = new Polygon( SIDES ); graph.polygon.draw();
360 degrees

The exterior angles are shown above.

graph.polygon.drawExteriorAngles();
graph.polygon.animateExteriorAngles( randRange( 0, SIDES - 1 ) );

The exterior angles fit together to form a circle

Therefore, the sum of the exterior angles is 360 degrees.