# Khan/khan-exercises

Rework existing basic perimeter exercise to not require algebra

1 parent bd30346 commit 587339ebc213d976d2e8f39e7594afd135a9a90b beneater committed Jun 7, 2012
Showing with 131 additions and 109 deletions.
1. +131 −109 exercises/perimeter_of_squares_and_rectangles.html
240 exercises/perimeter_of_squares_and_rectangles.html
 @@ -1,111 +1,72 @@ - + Perimeter of squares and rectangles - - -
+
+
+ randFromArray([ + ["in", "inch"], + ["ft", "foot"], + ["m", "meter"], + ["cm", "centimeter"], + ["", "unit"] + ]) +
randRange(1, 8)
-
-

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

-
+

+ One side of a square is S + plural(UNIT_TEXT, S) long. What is its perimeter? +

-
4 * S
+
+ 4 * S + plural(UNIT_TEXT) +
- initSq( S ); - - drawSqSide( S ); + init({ range: [[-1, 6], [-1, 6]] }); + path([[0, 0], [5, 0], [5, 5], [0, 5], true], + { stroke: BLUE, fill: "#eee" }); + path([[0, 0], [0, 5]], { "stroke": PINK }); + label([0, 2.5], S + "\\text{ " + UNIT + "}", "left", + { "color": PINK });
-

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

+

+ The perimeter is the total length of all the sides of the + shape added together. +

-

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

-
- drawSqPerimeter( S ); + path([[0, 0], [0, 5]], + { strokeWidth: 4, stroke: PINK }); + path([[0, 5], [5, 5]], + { strokeWidth: 4, stroke: BLUE }); + path([[5, 5], [5, 0]], + { strokeWidth: 4, stroke: "purple" }); + path([[5, 0], [0, 0]], + { strokeWidth: 4, stroke: GREEN });
+

+ Add up the lengths of the sides: +

+

\qquad\text{perimeter} = + \pink{S} + \blue{S} + + \purple{S} + \green{S} +

+

\qquad\text{perimeter} = + S * 4\text{ UNIT} +

@@ -114,25 +75,57 @@ randRange(1, 8)
-
-

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

-
+

+ The perimeter of a square is 4 * S + plural(UNIT_TEXT). How long is each side? +

-
S
+
+ S + plural(UNIT_TEXT) +
-
- initSq( S ); - - drawSqPerimeter( S ); +
+
+ init({ range: [[-1, 6], [-1, 6]] }); + path([[0, 0], [5, 0], [5, 5], [0, 5], true], + { stroke: BLUE, fill: "#eee" }); + path([[0, 0], [0, 5]], { "stroke": PINK }); + label([0, 2.5], "\\text{? " + UNIT + "}", "left", + { "color": PINK }); +
-

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 ); + path([[0, 0], [0, 5]], + { strokeWidth: 4, stroke: PINK }); + path([[0, 5], [5, 5]], + { strokeWidth: 4, stroke: BLUE }); + path([[5, 5], [5, 0]], + { strokeWidth: 4, stroke: PURPLE }); + path([[5, 0], [0, 0]], + { strokeWidth: 4, stroke: GREEN });
+

+ The perimeter is the total length of all the sides of + the shape added together. +

+

\qquad \pink{\text{?}} + \blue{\text{?}} + + \purple{\text{?}} + \green{\text{?}} = + 4 * S\text{ UNIT} +

+
+
+

\qquad \pink{S} + \blue{S} + + \purple{S} + \green{S} = + 4 * S\text{ UNIT} +

+

+ The sides of a square are all the same length, so each + side must be S + plural(UNIT_TEXT, S) long. +

@@ -143,28 +136,57 @@ randRange(1, 8)
-
-

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

- +

+ A rectangle is + L plural(UNIT_TEXT, L) + long and + W plural(UNIT_TEXT, W) + wide. What is its perimeter? +

+ +
+ 2 * L + 2 * W + plural(UNIT_TEXT)
-
2 * L + 2 * W
-
- initRect( L, W ); + init({ range: [[-1, L + 1], [-1, W + 1]], + scale: 200 / max(L, W) }); + path([[0, 0], [L, 0], [L, W], [0, W], true], + { stroke: BLUE, fill: "#eee" }); + label([L / 2, W], L + "\\text{ " + UNIT + "}", "above"); + label([L, W / 2], W + "\\text{ " + UNIT + "}", "right");
-

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

+

+ The perimeter is the total length of all the sides of the + shape added together. +

-

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 ); + path([[0, 0], [0, W]], + { strokeWidth: 4, stroke: PINK }); + path([[0, W], [L, W]], + { strokeWidth: 4, stroke: BLUE }); + path([[L, W], [L, 0]], + { strokeWidth: 4, stroke: PURPLE }); + path([[L, 0], [0, 0]], + { strokeWidth: 4, stroke: GREEN });
+

+ Add up the lengths of the sides: +

+

\qquad\text{perimeter} = + \pink{W} + \blue{L} + + \purple{W} + \green{L} +

+

\qquad\text{perimeter} = + 2 * L + 2 * W\text{ UNIT} +

- +