randRange(1, 8)

Suppose the side length of a square is \color{S_COLOR}{S}. What is its area?

S * S
initSq( S ); drawSqSide( S );

The area of a square is K = s \cdot s = s^2.

Substituting in s = \color{S_COLOR}{S} gives K = \color{S_COLOR}{S}^2 = \color{K_COLOR}{S * S}.

drawSqArea( S );
randRange(1, 8)

Suppose the side length of a square is \color{S_COLOR}{S}. What is its perimeter?

4 * S
initSq( S ); drawSqSide( S );

The perimeter of a square is P = s + s + s + s = 4s.

Substituting in s = \color{S_COLOR}{S} gives P = 4\cdot\color{S_COLOR}{S} = \color{P_COLOR}{4 * S}.

drawSqPerimeter( S );
randRange(1, 8)

Suppose the area of a square is \color{K_COLOR}{S * S}. What is its side length?

S
initSq( S ); drawSqArea( S );

The area of a square is K = s \cdot s = s^2, so s = \sqrt{K}.

Substituting in K = \color{K_COLOR}{S * S} gives s = \sqrt{\color{K_COLOR}{S * S}} = \color{S_COLOR}{S}.

drawSqSide( S );
randRange(1, 8)

Suppose the area of a square is \color{K_COLOR}{S * S}. What is its perimeter?

4 * S
initSq( S ); drawSqArea( S );

The area of a square is K = s \cdot s = s^2, so s = \sqrt{K}.

Substituting in K = \color{K_COLOR}{S * S} gives s = \sqrt{\color{K_COLOR}{S * S}} = \color{S_COLOR}{S}.

Now find the perimeter using P = s + s + s + s = 4s.

Substituting in s = \color{S_COLOR}{S} gives P = 4\cdot\color{S_COLOR}{S} = \color{P_COLOR}{4 * S}.

drawSqPerimeter( S );
randRange(1, 8)

Suppose the perimeter of a square is \color{P_COLOR}{4 * S}. What is its side length?

S
initSq( S ); drawSqPerimeter( S );

The perimeter of a square is P = s + s + s + s = 4s, so s = P/4.

Substituting in P = \color{P_COLOR}{4 * S} gives s = \color{P_COLOR}{4 * S}/4 = \color{S_COLOR}{S}.

drawSqSide( S );
randRange(1, 8)

Suppose the perimeter of a square is \color{P_COLOR}{4 * S}. What is its area?

S * S
initSq( S ); drawSqPerimeter( S );

The perimeter of a square is P = s + s + s + s = 4s, so s = P/4.

Substituting in P = \color{P_COLOR}{4 * S} gives s = \color{P_COLOR}{4 * S}/4 = \color{S_COLOR}{S}.

Now find the area using K = s \cdot s = s^2.

Substituting in s = \color{S_COLOR}{S} gives K = \color{S_COLOR}{S}^2 = \color{K_COLOR}{S * S}.

drawSqArea( S );
randRange(1, 8) randRange(1, 8)

Suppose a rectangle has length \color{L_COLOR}{L} and width \color{W_COLOR}{W}. What is its area?

L * W
initRect( L, W );

The area of a rectangle is K = lw.

Substituting in l = \color{L_COLOR}{L} and w = \color{W_COLOR}{W} gives K = \color{L_COLOR}{L} \cdot \color{W_COLOR}{W} = \color{K_COLOR}{L * W}.

drawRectArea( L, W );
randRange(1, 8) randRange(1, 8)

Suppose a rectangle has length \color{L_COLOR}{L} and width \color{W_COLOR}{W}. What is its perimeter?

2 * L + 2 * W
initRect( L, W );

The area of a rectangle is P = l + w + l + w = 2(l + w).

Substituting in l = \color{L_COLOR}{L} and w = \color{W_COLOR}{W} gives P = 2 (\color{L_COLOR}{L} + \color{W_COLOR}{W}) = \color{P_COLOR}{2 * L + 2 * W}.

drawRectPerimeter( L, W );