# Khan/khan-exercises

&lt;s and things

1 parent 65eec09 commit f065d79c042a9e7d3100fe640482a30cd2bc2bd6 spicyj committed Jan 4, 2012
Showing with 190 additions and 192 deletions.
4. +38 −38 exercises/angles_1.html
5. +28 −28 exercises/angles_2.html
7. +2 −2 exercises/comparing_fractions_1.html
8. +1 −1 exercises/comparing_fractions_2.html
9. +3 −3 exercises/compound_inequalities.html
10. +4 −4 exercises/converting_mixed_numbers_and_improper_fractions.html
11. +3 −3 exercises/corresponding_angles_2.html
12. +3 −3 exercises/decimals_on_the_number_line.html
13. +3 −3 exercises/dependent_probability.html
14. +1 −1 exercises/division_0.5.html
15. +1 −1 exercises/division_1.html
16. +4 −4 exercises/domain_and_range_0.5.html
17. +3 −3 exercises/equation_of_a_line.html
18. +3 −3 exercises/even_and_odd_functions.html
19. +1 −3 exercises/even_and_odd_integers.html
20. +1 −1 exercises/exponents_2.html
21. +1 −1 exercises/exponents_3.html
22. +2 −2 exercises/exponents_4.html
23. +1 −1 exercises/fractions_on_the_number_line.html
24. +1 −1 exercises/fractions_on_the_number_line_2.html
25. +1 −1 exercises/fractions_on_the_number_line_3.html
26. +5 −5 exercises/functions_1.html
27. +1 −1 exercises/graphs_of_sine_and_cosine.html
28. +4 −4 exercises/inverse_trig_functions.html
29. +5 −5 exercises/kinematic_equations.html
30. +2 −2 exercises/limits_2.html
31. +3 −3 exercises/line_relationships.html
32. +3 −3 exercises/linear_equations_4.html
33. +1 −1 exercises/mean_median_and_mode.html
34. +1 −1 exercises/multiplication_0.5.html
35. +1 −1 exercises/multiplication_1.html
36. +1 −1 exercises/multiplying_expressions_1.html
37. +1 −1 exercises/multiplying_fractions_1.html
38. +1 −1 exercises/multiplying_fractions_word_problems.html
39. +9 −9 exercises/multiplying_polynomials.html
42. +1 −1 exercises/rate_problems_1.html
43. +6 −6 exercises/representing_numbers.html
44. +12 −12 exercises/scaling_vectors.html
45. +6 −6 exercises/signs_of_a_parabola.html
46. +3 −3 exercises/slope_of_a_line.html
47. +1 −1 exercises/subtraction_1.html
 @@ -42,9 +42,9 @@ randRangeUniqueNonZero( 0, MAX_DEGREE, randRange(2, 3) ).sort().reverse() tabulate( function() { var coefs = []; - for ( var i = 0; i <= MAX_DEGREE; i++ ) { + for ( var i = 0; i <= MAX_DEGREE; i++ ) { var value = 0; - for ( var j = 0; j < NON_ZERO_INDICES.length; j++ ) { + for ( var j = 0; j < NON_ZERO_INDICES.length; j++ ) { if ( i === NON_ZERO_INDICES[ j ] ) { value = randRangeNonZero( -7, 7 ); break; @@ -103,7 +103,7 @@

Identify like terms.

-

( POL.coefs[ index ] < 0 ) ? "-" : ( n === 0 && POL === POL_1 ) ? "" : "+"\color{COLORS[ n ]}{abs( POL.coefs[ index ] ) === 1 ? "" : abs( POL.coefs[ index ] )X^index}

+

( POL.coefs[ index ] < 0 ) ? "-" : ( n === 0 && POL === POL_1 ) ? "" : "+"\color{COLORS[ n ]}{abs( POL.coefs[ index ] ) === 1 ? "" : abs( POL.coefs[ index ] )X^index}

 @@ -21,7 +21,7 @@ }); label( [0, 0], - "\\Huge{\\color{#6495ED}{ A } + \\color{#28AE7B}{ B } = {?}}", + "\\Huge{\\color{#6495ED}{" + A + "} + \\color{#28AE7B}{" + B + "} = {?}}", "right" );
 @@ -57,10 +57,10 @@ ( function() { var optionalPercentage = USEPERCENTAGES ? "% are " : " "; var qstn = INTRO; - for (var i=0; i< ORDER.length-1; i++) { + for (var i=0; i < ORDER.length-1; i++) { qstn += (i===ORDER.length-2) ? " and " : ""; qstn += VARVALS[ORDER[i]] + optionalPercentage + VARDESC[ORDER[i]]; - qstn += (i< ORDER.length-2) ? ", " : ". "; + qstn += (i < ORDER.length-2) ? ", " : ". "; } qstn += QSTNPRETEXT + VARDESC[ORDER[ORDER.length-1]] + QSTNPOSTTEXT; return qstn;
76 exercises/angles_1.html
 @@ -88,23 +88,23 @@ // Label the given angles if( RAND3 == 0 ) { - label( [0.5, 1.8], "\\color{green}{ACCUTEANGLE°}", + label( [0.5, 1.8], "\\color{green}{" + ACCUTEANGLE + "°}", "above" ); arc( [0, 0], 1.2, 70, 90, { stroke: "green" } ); ORIGINAL_LABEL = label( [-1.2, -0.75], "\\color{blue}{\\angle{AGF}}= {?}", "below left" ); arc( [0, 0], 1.2, 180, 248, { stroke: "blue" } ); } else if ( RAND3 == 1 ) { - label( [-1.2, -0.75], "\\color{green}{90-ACCUTEANGLE°}", + label( [-1.2, -0.75], "\\color{green}{" + (90-ACCUTEANGLE) + "°}", "below left" ); arc( [0, 0], 1.2, 180, 248, { stroke: "green" } ); ORIGINAL_LABEL = label( [0.5, 1.8], "\\color{blue}{\\angle{CGE}} = {?}", "above" ); arc( [0, 0], 1.2, 70, 90, { stroke: "blue" } ); } else { - label( [0, -2], "\\color{green}{ACCUTEANGLE°}", + label( [0, -2], "\\color{green}{" + ACCUTEANGLE + "°}", "below left" ); arc( [0, 0], 1.2, 248, 270, { stroke: "green" } ); @@ -138,7 +138,7 @@ because they are opposite angles from each other. Opposite angles are congruent (equal). - label( [1.2, 0], "\\color{orange}{90 - ACCUTEANGLE°}", + label( [1.2, 0], "\\color{orange}{" + (90 - ACCUTEANGLE) + "°}", "above right" ); arc( [0, 0], 1.2, 0, 68, { stroke: "orange" } ); @@ -157,7 +157,7 @@ \color{orange}{\angle{EGB}} = \color{purple}{90°} - \color{green}{\angle{CGE}} = 90 - ACCUTEANGLE° - label( [1.2, 0], "\\color{orange}{90 - ACCUTEANGLE°}", + label( [1.2, 0], "\\color{orange}{" + (90 - ACCUTEANGLE) + "°}", "above right" ); arc( [0, 0], 1.2, 0, 68, { stroke: "orange" } ); @@ -176,7 +176,7 @@ \color{purple}{90°} - \color{green}{\angle{DGF}} = 90 - ACCUTEANGLE° - label( [-1.2, 0], "\\color{orange}{90 - ACCUTEANGLE°}", + label( [-1.2, 0], "\\color{orange}{" + 90 - ACCUTEANGLE + "°}", Khan Academy member beneater added a line comment Mar 14, 2013 nope Khan Academy member spicyj added a line comment Mar 14, 2013 eh? Khan Academy member beneater added a line comment Mar 14, 2013 cbhl added a line comment Mar 14, 2013 I don't even -- this is a year old commit. to join this conversation on GitHub. Already have an account? Sign in to comment "below left" ); arc( [0, 0], 1.2, 180, 248, { stroke: "orange" } ); @@ -190,7 +190,7 @@ ORIGINAL_LABEL.remove(); label( [-1.2, -0.75], - "\\color{blue}{\\angle{AGF}}=90 - ACCUTEANGLE°", + "\\color{blue}{\\angle{AGF}}=" + (90 - ACCUTEANGLE) + "°", "below left" );

@@ -202,7 +202,7 @@ ORIGINAL_LABEL.remove(); label( [0.5, 1.8], - "\\color{blue}{\\angle{CGE}} = ACCUTEANGLE°", + "\\color{blue}{\\angle{CGE}} = " + ACCUTEANGLE + "°", "above" )

@@ -214,7 +214,7 @@ ORIGINAL_LABEL.remove(); label( [1.5, 0], - "\\color{blue}{\\angle{BGE}} = 90 - ACCUTEANGLE°", + "\\color{blue}{\\angle{BGE}} = " + (90 - ACCUTEANGLE) + "°", "above right" );

@@ -273,23 +273,23 @@ // Label the angles acording to variation if( RAND2 == 0 ) { - label( [3, -2], "\\color{green}{Tri_Y°}", + label( [3, -2], "\\color{green}{" + Tri_Y + "°}", "above left" ); arc( [4, -2], 1.2, 130, 180, { stroke: "green" } ); - label( [0, 1.5], "\\color{purple}{Tri_Z°}", + label( [0, 1.5], "\\color{purple}{" + Tri_Z + "°}", "below" ); arc( [0, 3], 1.5, 230, 310, { stroke: "purple" } ); ORIGINAL_LABEL = label( [-4.7, -2], "\\color{blue}{\\angle{DAB}}= {?}", "above left" ); arc( [-4, -2], .75, 50, 180, { stroke: "blue" } ); } else { - label( [-4.7, -2], "\\color{green}{180 - Tri_X°}", + label( [-4.7, -2], "\\color{green}{" + (180 - Tri_X) + "°}", "above left" ); arc( [-4, -2], .75, 50, 180, { stroke: "green" } ); - label( [0, 1.5], "\\color{purple}{Tri_Z°}", + label( [0, 1.5], "\\color{purple}{" + Tri_Z + "°}", "below" ); arc( [0, 3], 1.5, 230, 310, { stroke: "purple" } ); @@ -317,7 +317,7 @@ , This is because angles inside a triangle add up to 180 degrees. - label( [-3.3, -2], "\\color{orange}{Tri_X°}", + label( [-3.3, -2], "\\color{orange}{" + Tri_X + "°}", "above right" ); arc( [-4, -2], 0.75, 0, 49, {stroke: "orange"} ); @@ -331,7 +331,7 @@ because supplementary angles along a line add up to 180 degrees. - label( [-3.3, -2], "\\color{orange}{Tri_X°}", + label( [-3.3, -2], "\\color{orange}{" + Tri_X + "°}", "above right" ); arc( [-4, -2], 0.75, 0, 49, {stroke: "orange"} ); @@ -347,7 +347,7 @@ ORIGINAL_LABEL.remove(); label( [-4.7, -2], - "\\color{blue}{\\angle{DAB}} = Tri_Y + Tri_Z°", + "\\color{blue}{\\angle{DAB}} = " + (Tri_Y + Tri_Z) + "°", "above left" ); @@ -362,7 +362,7 @@ ORIGINAL_LABEL.remove(); label( [2.80, -2], - "\\color{blue}{\\angle{ACB}} = Tri_Y°", + "\\color{blue}{\\angle{ACB}} = " + Tri_Y + "°", "above left" );

@@ -446,32 +446,32 @@ "\\color{blue}{\\angle{AIH}} = {?}", "left" ); arc( [1.25, -3], .75, 135, 190, {stroke: "blue"} ); - label( [-4.2, 4.25], "\\color{green}{Tri_Z°}", "below" ); + label( [-4.2, 4.25], "\\color{green}{" + Tri_Z + "°}", "below" ); arc( [-4.47, 5.25], 1, 255, 330, {stroke: "green"} ); - label( [-5.5, -3.5], "\\color{purple}{Tri_X°}", + label( [-5.5, -3.5], "\\color{purple}{" + Tri_X + "°}", "above right" ); arc( [-6, -4], 1, 10, 80, {stroke: "purple"} ); } else if( RAND3 == 1 ) { ORIGINAL_LABEL = label( [3.5, -2.6], "\\color{blue}{\\angle{AKJ}} = {?}", "above" ); arc( [5.7, -2.3], 0.75, 139, 194, {stroke: "blue"} ); - label( [-4.4, 0.65], "\\color{green}{Tri_Z°}", "below" ); + label( [-4.4, 0.65], "\\color{green}{" + Tri_Z + "°}", "below" ); arc( [-5.07, 1.75], 1, 257, 326, {stroke: "green"} ); - label( [-5.5, -3.5], "\\color{purple}{Tri_X°}", + label( [-5.5, -3.5], "\\color{purple}{" + Tri_X + "°}", "above right" ); arc( [-6, -4], 1, 10, 80, {stroke: "purple"} ); } else { ORIGINAL_LABEL = label( [-5.5, -3.5], "\\color{blue}{\\angle{BAC}} = {?}", "above right" ); arc( [-6, -4], 1, 10, 80, {stroke: "blue"} ); - label( [4.1, -2.6], "\\color{purple}{Tri_Y°}", "above" ); + label( [4.1, -2.6], "\\color{purple}{" + Tri_Y + "°}", "above" ); arc( [5.7, -2.3], 0.75, 139, 194, {stroke: "purple"} ); - label( [-4.4, 0.65], "\\color{green}{Tri_Z°}", "below" ); + label( [-4.4, 0.65], "\\color{green}{" + Tri_Z + "°}", "below" ); arc( [-5.07, 1.75], 1, 257, 326, {stroke: "green"} ); } @@ -491,7 +491,7 @@ because they are corresponding angles formed by 2 parallel lines and a transversal line. Corresponding angles are congruent (equal). - label( [-4.60, 0.75], "\\color{orange}{Tri_Z°}", + label( [-4.60, 0.75], "\\color{orange}{" + Tri_Z + "°}", "below" ); arc( [-5.07, 1.75], 1, 260, 325, {stroke: "orange"} ); @@ -501,7 +501,7 @@ because they are corresponding angles formed by 2 parallel lines and a transversal line. Corresponding angles are congruent (equal). - label( [-4.00, 4.25], "\\color{orange}{Tri_Z°}", + label( [-4.00, 4.25], "\\color{orange}{" + Tri_Z + "°}", "below" ); arc( [-4.47, 5.25], 1, 257, 325, {stroke: "orange"} ); @@ -519,7 +519,7 @@ ORIGINAL_LABEL.remove(); label( [0, -2.50], - "\\color{blue}{\\angle{AIH}} = 180 - Tri_X - Tri_Z°", + "\\color{blue}{\\angle{AIH}} = " + (180 - Tri_X - Tri_Z) + "°", "left" );

@@ -528,11 +528,11 @@ ORIGINAL_LABEL.remove(); if ( RAND3 === 1 ) { label( [3.3, -2.6], - "\\color{blue}{\\angle{AKJ}} = Tri_Y°", + "\\color{blue}{\\angle{AKJ}} = " + Tri_Y + "°", "above" ); } else { label( [-5.5, -3.5], - "\\color{blue}{\\angle{BAC}} = Tri_X°", + "\\color{blue}{\\angle{BAC}} = " + Tri_X + "°", "above right" ); } @@ -617,11 +617,11 @@ "\\color{blue}{\\angle{IAK}} = {?}", "above left" ); arc( [0, 2], 1, 90, 135, {stroke:"blue"} ); - label( [4.75, -2], "\\color{green}{Tri_Y°}", + label( [4.75, -2], "\\color{green}{" + Tri_Y + "°}", "below right" ); arc( [4, -2], .75, 315, 360, {stroke: "green"} ); } else { - label( [0, 3], "\\color{green}{Tri_Y°}", "above left" ); + label( [0, 3], "\\color{green}{" + Tri_Y + "°}", "above left" ); arc( [0, 2], 1, 90, 135, {stroke:"green"} ); ORIGINAL_LABEL = label( [4.75, -2], @@ -643,18 +643,18 @@ because they are alternate exterior angles, formed by 2 parallel lines and a transversal line, they are congruent (equal). - label( [-.80, 2], "\\color{orange}{Tri_Y°}", + label( [-.80, 2], "\\color{orange}{" + Tri_Y + "°}", "above left" ); arc( [0, 2], 1, 135, 180, {stroke: "orange"} ); Alternatively, you can pair up using opposite angles and alternate interior angles to achieve the same result (as seen using \color{pink}{pink}). - label( [1, 2], "\\color{pink}{Tri_Y°}", + label( [1, 2], "\\color{pink}{" + Tri_Y + "°}", "below right" ); arc( [0, 2], 1, 315, 360, {stroke: "pink"} ); - label( [3, -2], "\\color{pink}{Tri_Y°}", + label( [3, -2], "\\color{pink}{" + Tri_Y + "°}", "above left" ); arc( [4, -2], 1, 135, 180, {stroke: "pink"} ); @@ -678,7 +678,7 @@ ORIGINAL_LABEL.remove(); label( [0, 3.5], - "\\color{blue}{\\angle{IAK}} = 90 - Tri_Y°", + "\\color{blue}{\\angle{IAK}} = " + (90 - Tri_Y) + "°", "above left" );

@@ -690,7 +690,7 @@ and \color{orange}{\angle{DAI}}, make up angle \color{purple}{\angle{DAK}}. - label( [-.80, 2], "\\color{orange}{90-Tri_Y°}", + label( [-.80, 2], "\\color{orange}{" + (90-Tri_Y) + "°}", "above left" ); arc( [0, 2], 1, 135, 180, {stroke: "orange"} ); @@ -706,16 +706,16 @@ angles to achieve the same result (as seen using \color{pink}{pink}). - label( [1, 2], "\\color{pink}{90-Tri_Y°}", + label( [1, 2], "\\color{pink}{" + (90-Tri_Y) + "°}", "below right" ); arc( [0, 2], 1, 315, 360, {stroke: "pink"} ); - label( [3, -2], "\\color{pink}{90-Tri_Y°}", + label( [3, -2], "\\color{pink}{" + (90-Tri_Y) + "°}", "above left" ); arc( [4, -2], 1, 135, 180, {stroke: "pink"} ); ORIGINAL_LABEL.remove(); label( [4.75, -2], - "\\color{blue}{\\angle{GCJ} = 90-Tri_Y°}", + "\\color{blue}{\\angle{GCJ} = " + (90-Tri_Y) + "°}", "below right" );

56 exercises/angles_2.html
 @@ -74,12 +74,12 @@ // label angle ABC arc([-4,3], .75, 312, 360, { stroke: "green" }); - label([-3.2, 3], "\\color{green}{Tri_Y°}", + label([-3.2, 3], "\\color{green}{" + Tri_Y + "°}", "below right", {color: "green"}); // label angle BAC arc([-1.3,0], .75, 38, 125, { stroke: "purple" }); - label([-1.3, .7], "\\color{purple}{Tri_Z°}", + label([-1.3, .7], "\\color{purple}{" + Tri_Z + "°}", "above", {color: "purple"}); // Label X according to problem variation @@ -112,7 +112,7 @@ // label angle BAC arc([2.5, 3], .75, 180, 220, { stroke: "orange" }); - label([1.8, 3], "\\color{orange}{Tri_X°}", + label([1.8, 3], "\\color{orange}{" + Tri_X + "°}", "below left", {color: "orange"});

@@ -124,7 +124,7 @@ LABEL.remove(); LABEL = label([-3.3, 0], - "\\color{blue}{\\angle{DAF}}=Tri_X°", + "\\color{blue}{\\angle{DAF}}=" + Tri_X + "°", "below"); @@ -134,7 +134,7 @@ LABEL.remove(); LABEL = label([1, 0], - "\\color{blue}{∠CAE} = Tri_X°", + "\\color{blue}{∠CAE} = " + Tri_X + "°", "above", { color: "blue"}); @@ -223,15 +223,15 @@ // label angle Y if(RAND_SWITCH3 == 0) { arc([1.2, 2], 1.5, 0, 50, { stroke: "purple" }); - label([3.1, 2], "\\color{purple}{\\angle{EGB}}=X°", + label([3.1, 2], "\\color{purple}{\\angle{EGB}}=" + X + "°", "above right"); } else if (RAND_SWITCH3 == 1) { arc([1.2, 2], 1.5, 180, 220, { stroke: "purple" }); - label([-1, 2], "\\color{purple}{\\angle{AGH}}=X°", + label([-1, 2], "\\color{purple}{\\angle{AGH}}=" + X + "°", "below left"); } else { arc([1.2, 2], 1, 220, 0, { stroke: "purple" }); - label([1.5, 1.2], "\\color{purple}{\\angle{BGH}}=180 - X°", + label([1.5, 1.2], "\\color{purple}{\\angle{BGH}}=" + (180 - X) + "°", "below right"); } @@ -254,7 +254,7 @@ because opposite angles are equal. arc([1,2], .88, 180, 225, {stroke:"orange"}); - label([0,2], "\\color{orange}{X°}", "below left"); + label([0,2], "\\color{orange}{" + X + "°}", "below left");

@@ -275,7 +275,7 @@ because angles along a line plane add up to 180°. arc([1,2], .88, 180, 225, {stroke:"orange"}); - label([0,2], "\\color{orange}{X°}", "below left"); + label([0,2], "\\color{orange}{" + X + "°}", "below left");

@@ -294,15 +294,15 @@ \angle{GHD} = X° LABEL.remove(); - label([-2, -2], "\\color{blue}{\\angle{GHD}}=X°", + label([-2, -2], "\\color{blue}{\\angle{GHD}}=" + X + "°", "above right"); \angle{CHF} = X° LABEL.remove(); - label([-4, -2.5], "\\color{blue}{\\angle{CHF}}=X°", + label([-4, -2.5], "\\color{blue}{\\angle{CHF}}=" + X + "°", "below left"); . @@ -363,10 +363,10 @@ label([-3.2, 1.3], "J", "below left"); // Label the given angles - label([-5.5, -5.2], "\\color{green}{Tri1_Y°}", + label([-5.5, -5.2], "\\color{green}{" + Tri1_Y + "°}", "above right"); arc([-6, -6], 1.3, 40, 71, { stroke: "green" }); - label([0, 7.4], "\\color{orange}{Tri1_X°}", + label([0, 7.4], "\\color{orange}{" + Tri1_X + "°}", "below"); arc([0, 9], 1.3, 245, 290, { stroke: "orange" }); @@ -403,7 +403,7 @@ // label angle BHD arc([3.2, 1.3], .75, 118, 220, { stroke: "purple" }); - label([2.6, 2], "\\color{purple}{Tri1_Z^\\circ}", + label([2.6, 2], "\\color{purple}{" + Tri1_Z + "^\\circ}", "below left");

@@ -416,7 +416,7 @@ LABEL.remove(); label([4.8, 1.0], - "\\color{blue}{\\angle{CHE}}=Tri1_Z^\\circ", + "\\color{blue}{\\angle{CHE}}=" + Tri1_Z + "^\\circ", "right"); @@ -438,7 +438,7 @@ LABEL.remove(); label([4, 2.5], - "\\color{blue}{\\angle{GHC}}=180 - Tri1_Z^\\circ", + "\\color{blue}{\\angle{GHC}}=" + (180 - Tri1_Z) + "^\\circ", "above"); @@ -447,7 +447,7 @@ LABEL.remove(); label([2.5, -0.5], - "\\color{blue}{\\angle{DHE}}=180 - Tri1_Z^\\circ", + "\\color{blue}{\\angle{DHE}}=" + (180 - Tri1_Z) + "^\\circ", "below"); @@ -509,10 +509,10 @@ // Label Angles and X according to variation if( RAND_SWITCH2 == 0) { // Label the given angles - label([-5.5, -5.2], "\\color{green}{Tri2_Y°}", + label([-5.5, -5.2], "\\color{green}{" + Tri2_Y + "°}", "above right"); arc([-6, -6], 1.3, 40, 71, { stroke: "green" }); - label([0, -.2], "\\color{orange}{180 - Tri2_Z°}", + label([0, -.2], "\\color{orange}{" + (180 - Tri2_Z) + "°}", "above"); arc([0, -1], 1, 28, 152, { stroke: "orange" }); @@ -521,10 +521,10 @@ arc([-3.2, 1.3], 1, 65, 142, { stroke: "blue" }); } else { // Label the given angles - label([6.5, 5], "\\color{green}{Tri2_Y°}", + label([6.5, 5], "\\color{green}{" + Tri2_Y + "°}", "below left"); arc([8, 5], 1.3, 180, 220, { stroke: "green" }); - label([1.3, 4.5], "\\color{orange}{180 - Tri2_Z°}", + label([1.3, 4.5], "\\color{orange}{" + (180 - Tri2_Z) + "°}", "below left"); arc([1.6, 5], 0.75, 180, 289, { stroke: "orange" }); @@ -549,7 +549,7 @@ // label angle JID arc([0, -1.2], .75, 143, 220, { stroke: "purple" }); - label([-.75, -1.2], "\\color{purple}{Tri2_Z°}", + label([-.75, -1.2], "\\color{purple}{" + Tri2_Z + "°}", "left");

@@ -559,7 +559,7 @@ // label angle HGC arc([1.8, 5], 1, 280, 0, { stroke: "purple" }); - label([2.5, 4.3], "\\color{purple}{Tri2_Z°}", + label([2.5, 4.3], "\\color{purple}{" + Tri2_Z + "°}", "below right");

@@ -571,7 +571,7 @@ // label angle JID arc([-3.2, 1.3], .75, 260, 320, { stroke: "teal" }); - label([-3.2, 0.50], "\\color{teal}{Tri2_X°}", + label([-3.2, 0.50], "\\color{teal}{" + Tri2_X + "°}", "below right");

@@ -582,7 +582,7 @@ // label angle CHG arc([3.2, 1.3], .75, 38, 120, { stroke: "teal" }); - label([3.4, 1.78], "\\color{teal}{Tri2_X°}", + label([3.4, 1.78], "\\color{teal}{" + Tri2_X + "°}", "above");

@@ -604,15 +604,15 @@ LABEL.remove(); label([-3.7, 2.5], - "\\color{blue}{\\angle{AJF}}=Tri2_X°", "above"); + "\\color{blue}{\\angle{AJF}}=" + Tri2_X + "°", "above"); \angle{IHE} = Tri2_X° LABEL.remove(); label([4.0, -0.3], - "\\color{blue}{\\angle{IHE}}=Tri2_X°", + "\\color{blue}{\\angle{IHE}}=" + Tri2_X + "°", "below left"); .
 @@ -15,7 +15,7 @@
randomTriangleAngles.triangle() - +
4 exercises/comparing_fractions_1.html
 @@ -21,7 +21,7 @@ randRange( NUM_2 + 1, 15 ) (function() { - if ( DEN_1 < DEN_2 ) { + if ( DEN_1 < DEN_2 ) { return ">"; } else { return "<"; @@ -75,7 +75,7 @@ randRange( 1, DEN_2 - 1 ) (function() { - if ( NUM_1 < NUM_2 ) { + if ( NUM_1 < NUM_2 ) { return "<"; } else { return ">";
2 exercises/comparing_fractions_2.html
 @@ -30,7 +30,7 @@ (function() { var f1 = NUM_1 / DEN_1; var f2 = NUM_2 / DEN_2; - if ( f1 < f2 ) { + if ( f1 < f2 ) { return "<"; } else if ( f1 > f2 ) { return ">";
6 exercises/compound_inequalities.html
 @@ -57,7 +57,7 @@ tabulate( function(i) { return COMP_SOLUTION[i] === "≤" || COMP_SOLUTION[i] === "<"; }, 2 ) - ( LESS_THAN[0] && !LESS_THAN[1] && SOLUTION[0] >= SOLUTION [1] ) || ( !LESS_THAN[0] && LESS_THAN[1] && SOLUTION[0] <= SOLUTION [1] ) + ( LESS_THAN[0] && !LESS_THAN[1] && SOLUTION[0] >= SOLUTION [1] ) || ( !LESS_THAN[0] && LESS_THAN[1] && SOLUTION[0] <= SOLUTION [1] ) ( LESS_THAN[0] && !LESS_THAN[1] && SOLUTION[1] > SOLUTION[0] ) || ( !LESS_THAN[0] && LESS_THAN[1] && SOLUTION[0] > SOLUTION[1] ) || ( LESS_THAN[0] !== LESS_THAN[1] && SOLUTION[0] === SOLUTION[1] && ( !INCLUSIVE[0] || !INCLUSIVE[1] ) ) randFromArray([ "or", "and" ]) OR === "or" @@ -74,7 +74,7 @@ if ( SOLUTION[0] === SOLUTION[1] ) { return INCLUSIVE[0] ? 1 : 2; } - return SOLUTION[0] < SOLUTION[1] ? 1 : 2; + return SOLUTION[0] < SOLUTION[1] ? 1 : 2; } return 0; @@ -144,7 +144,7 @@ // Draw both inequalities var y_placement = [ 0.05, -0.05 ]; - for ( var i = 0; i < 2; i++ ) { + for ( var i = 0; i < 2; i++ ) { style({ stroke: COLOR[i], fill: COLOR[i], strokeWidth: 3.5, arrows: "->" }); path([ [ SOLUTION[i] + 0.15 * ( LESS_THAN[i] ? -1 : 1 ), y_placement[i] ], [ LESS_THAN[i] ? start : end, y_placement[i] ] ]); style({ stroke: COLOR[i], fill: INCLUSIVE[i] ? COLOR[i] : null });
8 exercises/converting_mixed_numbers_and_improper_fractions.html
 @@ -35,7 +35,7 @@
init({ range: [ [0, 1], [0, WHOLE] ], scale: [250, 25] }); - for ( var y = 0; y < WHOLE; y++ ) { + for ( var y = 0; y < WHOLE; y++ ) { rectchart( [M_REDUCED_DENOM, 0], ["#28AE7B", "#999"], y ); }
@@ -54,7 +54,7 @@
init({ range: [ [0, 1], [0, WHOLE + 1] ], scale: [250, 25] }); - for ( var y = 1; y <= WHOLE; y++ ) { + for ( var y = 1; y <= WHOLE; y++ ) { rectchart( [M_REDUCED_DENOM, 0], ["#28AE7B", "#999"], y ); } @@ -79,7 +79,7 @@
init({ range: [ [0, 1], [0, WHOLE] ], scale: [250, 25] }); - for ( var y = 0; y < WHOLE; y++ ) { + for ( var y = 0; y < WHOLE; y++ ) { rectchart( [M_REDUCED_DENOM, 0], ["#FFA500", "#999"], y ); }
@@ -89,7 +89,7 @@
init({ range: [ [0, 1], [0, WHOLE + 1] ], scale: [250, 25] }); - for ( var y = 1; y <= WHOLE; y++ ) { + for ( var y = 1; y <= WHOLE; y++ ) { rectchart( [M_REDUCED_DENOM, 0], ["#FFA500", "#999"], y ); }
6 exercises/corresponding_angles_2.html
 @@ -8,12 +8,12 @@
- - randRangeNonZero( -20, 20 ) +
+ randRangeNonZero( -20, 20 ) randRange( 2, 8 ) randRangeNonZero( -200, 200 ) randRange( 2, 9 ) - +
A * SOLUTION + B - C * SOLUTION (A*D-B*C) / (A-C)
6 exercises/decimals_on_the_number_line.html
 @@ -12,19 +12,19 @@ ( randRange( -300, 300 ) / 100 ) ( function() { var pos = rand( 5 ); - while( NUMBER - (0.47 * pos) < -3 ){ + while( NUMBER - (0.47 * pos) < -3 ){ pos--; } while( NUMBER + 0.47 * (5 - pos) > 3 ){ pos++; } arr = []; - for ( i = 0; i < pos; i++){ + for ( i = 0; i < pos; i++){ arr.push( NUMBER - ((pos - i) * 0.47)) } arr.push( NUMBER ); - for ( i = pos + 1; i < 5; i++ ){ + for ( i = pos + 1; i < 5; i++ ){ arr.push( NUMBER + (( i - pos) * 0.47)) } return arr;
6 exercises/dependent_probability.html
 @@ -51,7 +51,7 @@ (function() { var uhdf = DECIMAL_CHANCE_UNFAIR_HEADS.toString() - for (var i = 0; i < NUM_FLIPS - 1; i++) { + for (var i = 0; i < NUM_FLIPS - 1; i++) { uhdf += " \\times " + DECIMAL_CHANCE_UNFAIR_HEADS; } return uhdf; @@ -60,7 +60,7 @@ (function() { var uhpf = PERCENT_CHANCE_UNFAIR_HEADS + "\\%"; - for (var i = 0; i < NUM_FLIPS - 1; i++) { + for (var i = 0; i < NUM_FLIPS - 1; i++) { uhpf += " \\times " + PERCENT_CHANCE_UNFAIR_HEADS + "\\%"; } return uhpf; @@ -70,7 +70,7 @@ (function() { var fhdf = DECIMAL_CHANCE_FAIR_HEADS.toString(); - for (var i = 0; i < NUM_FLIPS - 1; i++) { + for (var i = 0; i < NUM_FLIPS - 1; i++) { fhdf += " \\times " + DECIMAL_CHANCE_FAIR_HEADS; } return fhdf;
2 exercises/division_0.5.html
 @@ -23,7 +23,7 @@ }); KhanUtil.currentGraph.labelHolder = label( [ 0, A ], - "\\Huge{\\color{#6495ED}{ C } \\div \\color{#FFA500}{ B } = {?}}", "right" ); + "\\Huge{\\color{#6495ED}{" + C + "} \\div \\color{#FFA500}{" + B + "} = {?}}", "right" );
A
2 exercises/division_1.html
 @@ -23,7 +23,7 @@ }); KhanUtil.currentGraph.labelHolder = label( [ 0, A ], - "\\Huge{\\color{#6495ED}{ C } \\div \\color{#FFA500}{ B } = {?}}", "right" ); + "\\Huge{\\color{#6495ED}{" + C + "} \\div \\color{#FFA500}{" + B + "} = {?}}", "right" );
A
8 exercises/domain_and_range_0.5.html
 @@ -23,16 +23,16 @@ push([ DOMAIN[0], randRange( -5, 5 ) ]); for( var i = DOMAIN[0]+1; i <= DOMAIN[1]; i++ ) { - if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && prev[1] < 8 ) { + if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && prev[1] < 8 ) { push([i, prev[1]+1]); - } else if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && prev[1] > -8 ) { + } else if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && prev[1] > -8 ) { push([i, prev[1]-1]); - } else if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && prev[1] < 7 ) { + } else if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && prev[1] < 7 ) { push([i, prev[1]+2]); - } else if ( abs( randRangeNonZero( -10, 10 ) < 3 ) && prev[1] > -7 ) { + } else if ( abs( randRangeNonZero( -10, 10 ) < 3 ) && prev[1] > -7 ) { push([i, prev[1]-2]); } else {
6 exercises/equation_of_a_line.html
 @@ -42,7 +42,7 @@ if( x !== X1 && x !== X2 ) { var denom = X1 - X2, num = x * ( Y1 - Y2 ) + B * denom, - negative = ( num * denom < 0 ? -1 : 1 ); + negative = ( num * denom < 0 ? -1 : 1 ); num = round( abs( num ) * negative ); denom = round( abs( denom ) ); @@ -96,7 +96,7 @@

The equation for the slope is m = \dfrac{y_2 - y_1}{x_2 - x_1}.

Substitute both points.

-

m = \dfrac{Y2 - negParens(Y1)}{X2 - negParens(X1)} = fractionReduce( Y2 - Y1, X2 - X1 )

+

m = \dfrac{Y2 - negParens(Y1)}{X2 - negParens(X1)} = fractionReduce( Y2 - Y1, X2 - X1 )

Writing the equation of the line, we have y = ( M == -1 ? "-" : ( M == 1 ? "" : fractionReduce( Y2 - Y1, X2 - X1 ))) x + b @@ -169,7 +169,7 @@

The equation for the slope is m = \dfrac{y_2 - y_1}{x_2 - x_1}.

Substitute both points.

-

m = \dfrac{Y2 - negParens(Y1)}{X2 - negParens(X1)} = fractionReduce( Y2 - Y1, X2 - X1 )

+

m = \dfrac{Y2 - negParens(Y1)}{X2 - negParens(X1)} = fractionReduce( Y2 - Y1, X2 - X1 )

Writing the equation of the line, we have y = ( M == -1 ? "-" : ( M == 1 ? "" : fractionReduce( Y2 - Y1, X2 - X1 ))) x + b

6 exercises/even_and_odd_functions.html
 @@ -99,8 +99,8 @@ jQuery.grep( [1,2,3,4,5,6,7,8,9,10], function( i ) { return ( abs( valAt( WIDES, i ) ) > 1 || abs( valAt( WIDES, -i ) ) > 1 ) - && abs( valAt( WIDES, i ) ) < 10 - && abs( valAt( WIDES, -i ) ) < 10; + && abs( valAt( WIDES, i ) ) < 10 + && abs( valAt( WIDES, -i ) ) < 10; } ) @@ -111,7 +111,7 @@ jQuery.grep( PTS, function( i ) { return abs( abs( valAt( WIDES, i ) ) - abs( valAt( WIDES, -i ) ) ) > 0.5 - && abs( i ) < 10; + && abs( i ) < 10; } ) )
4 exercises/even_and_odd_integers.html
 @@ -147,9 +147,7 @@
- // hack to get around graphie script not working with data-each - // (graphie script executes after the data-each templating's done) - HINTS[I].graph( KhanUtil.currentGraph ); + HINTS[I].graph( KhanUtil.currentGraph );

HINT.text

2 exercises/exponents_2.html
 @@ -51,7 +51,7 @@ VALS.base_n VALS.base_d - VALS.exp < 0 + VALS.exp < 0 EXP_NEG ? "-" : "" abs( VALS.exp )
2 exercises/exponents_3.html
 @@ -17,7 +17,7 @@ VALS.base_1 VALS.base_2 - random() < .75 + random() < .75 VALS.root
4 exercises/exponents_4.html
 @@ -15,10 +15,10 @@
twoBasesOneRoot() - random() < .75 + random() < .75 VALS.root - isOdd( EXP_D ) && ( random() < .75 ) + isOdd( EXP_D ) && ( random() < .75 ) VALS.base_1 VALS.base_2
2 exercises/fractions_on_the_number_line.html
 @@ -117,7 +117,7 @@ style({ stroke: "#FFA500", fill: "#FFA500", strokeWidth: 3.5 }); var already = []; for( i = 0; i != WRONGS.length; i++ ){ - if( WRONGS[ i ] >= start && WRONGS[ i ] <= end ){ + if( WRONGS[ i ] >= start && WRONGS[ i ] <= end ){ ellipse( [ WRONGS[ i ] - start, 0 ], [ 0.01, 0.12 ] ); label( [WRONGS[ i ] - start, 0 ], POSS_ANSWER[ i ] , "above", { labelDistance: 5 } ); }
2 exercises/fractions_on_the_number_line_2.html
 @@ -18,7 +18,7 @@ NUMERATOR % DENOMINATOR (NUMERATOR - M_NUMERATOR) / DENOMINATOR - (abs(SOLUTION) > 1 ? M_WHOLE + (SOLUTION < 0 ? fraction(M_NUMERATOR, -DENOMINATOR) : fraction(M_NUMERATOR, DENOMINATOR)) : fraction(NUMERATOR, DENOMINATOR)) + (abs(SOLUTION) > 1 ? M_WHOLE + (SOLUTION < 0 ? fraction(M_NUMERATOR, -DENOMINATOR) : fraction(M_NUMERATOR, DENOMINATOR)) : fraction(NUMERATOR, DENOMINATOR)) 0 IS_MIXED === 1 && abs(SOLUTION) > 1 ? M_NUMBER : fraction(NUMERATOR, DENOMINATOR)
2 exercises/fractions_on_the_number_line_3.html
 @@ -18,7 +18,7 @@ NUMERATOR % DENOMINATOR (NUMERATOR - M_NUMERATOR) / DENOMINATOR - (abs(SOLUTION) > 1 ? M_WHOLE + (SOLUTION < 0 ? fraction(M_NUMERATOR, -DENOMINATOR) : fraction(M_NUMERATOR, DENOMINATOR)) : fraction(NUMERATOR, DENOMINATOR)) + (abs(SOLUTION) > 1 ? M_WHOLE + (SOLUTION < 0 ? fraction(M_NUMERATOR, -DENOMINATOR) : fraction(M_NUMERATOR, DENOMINATOR)) : fraction(NUMERATOR, DENOMINATOR)) 0 IS_MIXED === 1 && abs(SOLUTION) > 1 ? M_NUMBER : fraction(NUMERATOR, DENOMINATOR)
10 exercises/functions_1.html
 @@ -13,17 +13,17 @@ var functionPath = new Array(); functionPath.push([ -11, randRange( -5, 5 ) ]); - for( var i = -10; i < 11; i++ ) { - if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && functionPath[i+10][1] < 8 ) { + for( var i = -10; i < 11; i++ ) { + if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && functionPath[i+10][1] < 8 ) { functionPath.push([i, functionPath[i+10][1]+1]); - } else if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && functionPath[i+10][1] > -8 ) { + } else if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && functionPath[i+10][1] > -8 ) { functionPath.push([i, functionPath[i+10][1]-1]); - } else if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && functionPath[i+10][1] < 7 ) { + } else if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && functionPath[i+10][1] < 7 ) { functionPath.push([i, functionPath[i+10][1]+2]); - } else if ( abs( randRangeNonZero( -10, 10 ) < 3 ) && functionPath[i+10][1] > -7 ) { + } else if ( abs( randRangeNonZero( -10, 10 ) < 3 ) && functionPath[i+10][1] > -7 ) { functionPath.push([i, functionPath[i+10][1]-2]); } else {
2 exercises/graphs_of_sine_and_cosine.html
 @@ -24,7 +24,7 @@ randFromArray( [ "cos", "sin" ] ) { "cos": "cosine", "sin": "sine"}[FN] randRange( 1, 5 ) / 2 - random() < .5 ? randRange( 1, 4 ) : 1 / randRange( 1, 4 ) + random() < .5 ? randRange( 1, 4 ) : 1 / randRange( 1, 4 ) 2 * PI * HSCALE 3.5
8 exercises/inverse_trig_functions.html
 @@ -12,10 +12,10 @@
- random() < 0.5 + random() < 0.5 - random() < 0.5 + random() < 0.5 randFromArray([ "sin", "cos", "tan" ]) "\\" + FN + "^{-1}" @@ -27,7 +27,7 @@ [ 0, 1/2, sqrt(2)/2, sqrt(3)/2 ] [ 0, sqrt(3)/3, 1, sqrt(3) ] - ( random() < 0.5 ? -1 : 1 ) * { + ( random() < 0.5 ? -1 : 1 ) * { sin: randFromArray( SIN_RANGE ), cos: randFromArray( SIN_RANGE ), tan: randFromArray( TAN_RANGE ) @@ -47,7 +47,7 @@ function( n ) { - var sign = n < 0 ? "-" : ""; + var sign = n < 0 ? "-" : ""; n = abs( n ); var o = {};
10 exercises/kinematic_equations.html
 @@ -20,10 +20,10 @@ /* negative under radical */ - (OMITTED=='v_i' && UNKNOWN == 't' && (V_FINAL * V_FINAL - 2 * ACCEL * DISP < 0.1)) || - (OMITTED=='v_f' && UNKNOWN == 't' && (V_INIT * V_INIT + 2 * ACCEL * DISP < 0.1)) || - (OMITTED=='t' && UNKNOWN == 'v_i' && (V_FINAL * V_FINAL - 2 * ACCEL * DISP < 0.1)) || - (OMITTED=='t' && UNKNOWN == 'v_f' && (V_INIT * V_INIT + 2 * ACCEL * DISP < 0.1)) || + (OMITTED=='v_i' && UNKNOWN == 't' && (V_FINAL * V_FINAL - 2 * ACCEL * DISP < 0.1)) || + (OMITTED=='v_f' && UNKNOWN == 't' && (V_INIT * V_INIT + 2 * ACCEL * DISP < 0.1)) || + (OMITTED=='t' && UNKNOWN == 'v_i' && (V_FINAL * V_FINAL - 2 * ACCEL * DISP < 0.1)) || + (OMITTED=='t' && UNKNOWN == 'v_f' && (V_INIT * V_INIT + 2 * ACCEL * DISP < 0.1)) || /* division by 0 */ (OMITTED=='d' && UNKNOWN == 'a' && TIME == 0) || @@ -36,7 +36,7 @@ (OMITTED=='v_f' && UNKNOWN == 't' && ACCEL == 0) || (OMITTED=='a' && UNKNOWN == 'v_i' && TIME == 0) || (OMITTED=='a' && UNKNOWN == 'v_f' && TIME == 0) || - (OMITTED=='a' && UNKNOWN == 't' && (-0.1 < V_INIT + V_FINAL) && (V_INIT + V_FINAL < 0.1)) || + (OMITTED=='a' && UNKNOWN == 't' && (-0.1 < V_INIT + V_FINAL) && (V_INIT + V_FINAL < 0.1)) || (OMITTED=='t' && UNKNOWN == 'd' && ACCEL == 0) || (OMITTED=='t' && UNKNOWN == 'a' && DISP == 0)
4 exercises/limits_2.html
 @@ -88,8 +88,8 @@

Look at the leading terms expr(NUM.expr()[1]) and expr(DEN.expr()[1]).

-

As x \to \infty, the numerator approaches NUM.getCoefAndDegreeForTerm(0).coef < 0 ? "-" : ""\infty because the coefficient NUM.getCoefAndDegreeForTerm(0).coef is NUM.getCoefAndDegreeForTerm(0).coef < 0 ? "negative" : "positive".

-

As x \to \infty, the denominator NUM.getCoefAndDegreeForTerm(0).coef * DEN.getCoefAndDegreeForTerm(0).coef > 0 ? "also " : ""approaches DEN.getCoefAndDegreeForTerm(0).coef < 0 ? "-" : ""\infty because the coefficient DEN.getCoefAndDegreeForTerm(0).coef is DEN.getCoefAndDegreeForTerm(0).coef < 0 ? "negative" : "positive".

+

As x \to \infty, the numerator approaches NUM.getCoefAndDegreeForTerm(0).coef < 0 ? "-" : ""\infty because the coefficient NUM.getCoefAndDegreeForTerm(0).coef is NUM.getCoefAndDegreeForTerm(0).coef < 0 ? "negative" : "positive".

+

As x \to \infty, the denominator NUM.getCoefAndDegreeForTerm(0).coef * DEN.getCoefAndDegreeForTerm(0).coef > 0 ? "also " : ""approaches DEN.getCoefAndDegreeForTerm(0).coef < 0 ? "-" : ""\infty because the coefficient DEN.getCoefAndDegreeForTerm(0).coef is DEN.getCoefAndDegreeForTerm(0).coef < 0 ? "negative" : "positive".

Because the numerator's degree NUM.getCoefAndDegreeForTerm(0).degree is greater than the denominator's degree DEN.getCoefAndDegreeForTerm(0).degree, the limit diverges.

The numerator and denominator have the same sign as x gets large, so the limit is +\infty.

The numerator and denominator have differing signs as x gets large, so the limit is -\infty.

6 exercises/line_relationships.html
 @@ -42,7 +42,7 @@ plot(function( x ) { return ( M * x + B ); }, [-10, 10], { - stroke: "BLUE" + stroke: BLUE }); circle( [X, Y], 1/4, { @@ -77,7 +77,7 @@ plot(function( x ) { return ( -1 / M * x + ( Y - ( -1 / M * X ) ) ); }, [-10, 10], { - stroke: "GREEN" + stroke: GREEN }); @@ -113,7 +113,7 @@ plot(function( x ) { return ( M * x + ( Y - M * X ) ); }, [-10, 10], { - stroke: "GREEN" + stroke: GREEN });
6 exercises/linear_equations_4.html
 @@ -32,7 +32,7 @@

\qquad A * Cx + A * D = B

-

Now A * D < 0 ? "add" : "subtract" abs( A * D ) A * D < 0 ? "to" : "from" both sides:

+

Now A * D < 0 ? "add" : "subtract" abs( A * D ) A * D < 0 ? "to" : "from" both sides:

\qquad (A * Cx + A * D) + -A * D = B + - A * D

\qquad A * Cx = B - A * D

@@ -64,12 +64,12 @@

\qquad expr(["*", A, "x"]) + B = expr(["*", E * C, "x"]) + E * D

-

Now E * C < 0 ? "add" : "subtract" abs( E * C )x E * C < 0 ? "to" : "from" both sides:

+

Now E * C < 0 ? "add" : "subtract" abs( E * C )x E * C < 0 ? "to" : "from" both sides:

\qquad (expr(["*", A, "x"]) + B) + -E * Cx = (expr(["*", E * C, "x"]) + E * D) + -E * Cx

\qquad A - E * Cx + B = E * D

-

Now B < 0 ? "add" : "subtract" abs( B ):

+

Now B < 0 ? "add" : "subtract" abs( B ):

\qquad (A - E * Cx + B) + -B = E * D + -B

\qquad A - E * Cx = E * D - B

2 exercises/mean_median_and_mode.html
 @@ -166,7 +166,7 @@ }); for ( var num in freq ) { - for ( var i = 0, l = freq[ num ]; i < l; i++ ) { + for ( var i = 0, l = freq[ num ]; i < l; i++ ) { circle( [num, ( i + 1.5 ) / 2], 5/40, { stroke: "none", fill: "#6495ed" } ); } }
2 exercises/multiplication_0.5.html
 @@ -20,7 +20,7 @@ scale: [ 50, 50 ] }); KhanUtil.currentGraph.labelHolder = label( [ 0, B ], - "\\Huge{\\color{#6495ED}{ A } \\times \\color{#28AE7B}{ B } = {?}}", "right" ); + "\\Huge{\\color{#6495ED}{" + A + "} \\times \\color{#28AE7B}{" + B + "} = {?}}", "right" );
A * B
2 exercises/multiplication_1.html
 @@ -20,7 +20,7 @@ scale: [ 50, 50 ] }); KhanUtil.currentGraph.labelHolder = label( [ 0, B ], - "\\Huge{\\color{#6495ED}{ A } \\times \\color{#28AE7B}{ B } = {?}}", "right" ); + "\\Huge{\\color{#6495ED}{" + A + "} \\times \\color{#28AE7B}{" + B + "} = {?}}", "right" );
A * B
2 exercises/multiplying_expressions_1.html
 @@ -25,7 +25,7 @@
- random() < 0.25 + random() < 0.25 randRangeNonZero( -10, 10 ) randRangeNonZero( -10, 10 )
2 exercises/multiplying_fractions_1.html
 @@ -466,7 +466,7 @@ randRange( 2, 5 ) ( function() { var a = []; - for ( var i = 1; i <= B; i++ ) { a.push( i ); } + for ( var i = 1; i <= B; i++ ) { a.push( i ); } return a; } )()
2 exercises/multiplying_fractions_word_problems.html
 @@ -419,7 +419,7 @@ --> -

person(1) needed plural(SOLUTION,"cup") of chocolate chips to make enough cookies for the bake sale.

+

person(1) needed plural(SOLUTION, "cup") of chocolate chips to make enough cookies for the bake sale.

18 exercises/multiplying_polynomials.html
 @@ -16,9 +16,9 @@ }, 2 ) tabulate( function(n) { var coefs = []; - for ( var i = 0; i <= MAX_DEGREE; i++ ) { + for ( var i = 0; i <= MAX_DEGREE; i++ ) { var value = 0; - for ( var j = 0; j < NON_ZERO_INDICES[ n ].length; j++ ) { + for ( var j = 0; j < NON_ZERO_INDICES[ n ].length; j++ ) { if ( i === NON_ZERO_INDICES[ n ][ j ] ) { value = randRangeNonZero( -7, 7 ); break; @@ -34,11 +34,11 @@ var counter = 0; var areLikeTerms = false; - for ( var i = POL_1.minDegree; i <= POL_1.maxDegree; i++ ) { + for ( var i = POL_1.minDegree; i <= POL_1.maxDegree; i++ ) { if ( POL_1.coefs[ i ] === 0 ) { continue; } - for ( var j = POL_2.minDegree; j <= POL_2.maxDegree; j++ ) { + for ( var j = POL_2.minDegree; j <= POL_2.maxDegree; j++ ) { if ( POL_2.coefs[ j ] === 0 ) { continue; } @@ -59,7 +59,7 @@ var counter = 0; var coefs = []; - for ( var i = 0; i < SOLUTION.coefs.length; i++ ) + for ( var i = 0; i < SOLUTION.coefs.length; i++ ) { if ( SOLUTION.coefs[ i ] === 0 ) { continue; @@ -88,11 +88,11 @@

First use the distributive property.

- ( POL_1.coefs[ index1 ] < 0 ) ? "-" : ( n1 === 0 && n2 === 0 ) ? "" : "+"abs( POL_1.coefs[ index1 ] ) === 1 ? "" : abs( POL_1.coefs[ index1 ] )X^index1(( POL_2.coefs[ index2 ] === 1 ) ? "" : ( POL_2.coefs[ index2 ] === -1 ) ? "-" : POL_2.coefs[ index2 ]X^index2) + ( POL_1.coefs[ index1 ] < 0 ) ? "-" : ( n1 === 0 && n2 === 0 ) ? "" : "+"abs( POL_1.coefs[ index1 ] ) === 1 ? "" : abs( POL_1.coefs[ index1 ] )X^index1(( POL_2.coefs[ index2 ] === 1 ) ? "" : ( POL_2.coefs[ index2 ] === -1 ) ? "-" : POL_2.coefs[ index2 ]X^index2)

Simplify.

- ( POL_1.coefs[ index1 ] * POL_2.coefs[ index2 ] < 0 ) ? "-" : ( n1 === 0 && n2 === 0 ) ? "" : "+"abs( POL_1.coefs[ index1 ] * POL_2.coefs[ index2 ] )X^{index1 + index2} + ( POL_1.coefs[ index1 ] * POL_2.coefs[ index2 ] < 0 ) ? "-" : ( n1 === 0 && n2 === 0 ) ? "" : "+"abs( POL_1.coefs[ index1 ] * POL_2.coefs[ index2 ] )X^{index1 + index2}
SOLUTION

You're done!

@@ -101,11 +101,11 @@

Identify like terms.

- \color{LIKE_TERMS[ index1 + index2 ]}{( POL_1.coefs[ index1 ] * POL_2.coefs[ index2 ] < 0 ) ? "-" : ( n1 === 0 && n2 === 0 ) ? "" : "+"abs( POL_1.coefs[ index1 ] * POL_2.coefs[ index2 ] )X^{index1 + index2}} + \color{LIKE_TERMS[ index1 + index2 ]}{( POL_1.coefs[ index1 ] * POL_2.coefs[ index2 ] < 0 ) ? "-" : ( n1 === 0 && n2 === 0 ) ? "" : "+"abs( POL_1.coefs[ index1 ] * POL_2.coefs[ index2 ] )X^{index1 + index2}}

-

\color{LIKE_TERMS[ SOLUTION.getCoefAndDegreeForTerm( n ).degree ]}{( SOLUTION.getCoefAndDegreeForTerm( n ).coef < 0 || n === 0 ) ? "" : "+"expr( SOLUTION.expr()[ n + 1 ] )}

+

\color{LIKE_TERMS[ SOLUTION.getCoefAndDegreeForTerm( n ).degree ]}{( SOLUTION.getCoefAndDegreeForTerm( n ).coef < 0 || n === 0 ) ? "" : "+"expr( SOLUTION.expr()[ n + 1 ] )}

You're done!

 @@ -24,7 +24,7 @@ (function() { var wrongs = []; - for ( var i = 0; i < 5; i++ ) { + for ( var i = 0; i < 5; i++ ) { var bad_a = randRangeNonZero(-10, 10); var bad_b = randRangeNonZero(-10, 10); var bad_c = randRangeNonZero(-10, 10); @@ -36,7 +36,7 @@ abs(B*bad_gcd)== abs(bad_b*good_gcd) && abs(C*bad_gcd)== abs(bad_c*good_gcd) ) || - (( (bad_b * bad_b) - (4 * bad_a * bad_c) ) < 0)) + (( (bad_b * bad_b) - (4 * bad_a * bad_c) ) < 0)) { bad_a = randRangeNonZero(-10, 10); bad_b = randRangeNonZero(-10, 10);
 @@ -36,25 +36,25 @@

For what values of x does -

plus(XX, (A+B)+X) < -C

+

plus(XX, (A+B)+X) < -C

R1 - < x < + < x < R2

-

First, move the term over to the other side of the inequality
plus(XX, (A+B)+X, C) < 0

-

Now, let's factor the quadratic equation
mult(LEFT, RIGHT) < 0

-

either LEFT < 0 and RIGHT > 0 or
- LEFT > 0 and RIGHT < 0

-

either X < -A and X > -B or
- X > -A and X < -B

+

First, move the term over to the other side of the inequality
plus(XX, (A+B)+X, C) < 0

+

Now, let's factor the quadratic equation
mult(LEFT, RIGHT) < 0

+

either LEFT < 0 and RIGHT > 0 or
+ LEFT > 0 and RIGHT < 0

+

either X < -A and X > -B or
+ X > -A and X < -B

which we can graph, like so:

@@ -76,7 +76,7 @@ strokeWidth:5 }, function() { line([12+R1,1], [12+R2,1]); - label([12+(R1+R2)/2,.5], R1 + " < x < "+R2, "above"); + label([12+(R1+R2)/2,.5], R1 + " < x < "+R2, "above"); }); style({
2 exercises/rate_problems_1.html
 @@ -27,7 +27,7 @@ REASONABLESPEED(VEHC1) REASONABLESPEED(VEHC2) - SPEED1 < SPEED2 ? randRange(SPEED1 + 1, SPEED2 - 1) : randRange(SPEED2 + 1, SPEED1 - 1) + SPEED1 < SPEED2 ? randRange(SPEED1 + 1, SPEED2 - 1) : randRange(SPEED2 + 1, SPEED1 - 1) randRange(1, 9) AVG * TIME (SPEED1 * SPEED2 * TIME - DIST * SPEED2) / (SPEED1 - SPEED2)
12 exercises/representing_numbers.html
 @@ -33,7 +33,7 @@ stroke: "#4e74ba" }); - for ( var i = 0; i < C; i++ ) { + for ( var i = 0; i < C; i++ ) { path([ [1.5 * i, 0], [1.5 * i, 1], [1.5 * i + 1, 1], [1.5 * i + 1, 0], true ]); } @@ -51,7 +51,7 @@ stroke: "#4e74ba" }); - for ( var i = 0; i < B; i++ ) { + for ( var i = 0; i < B; i++ ) { path([ [0, -1.5 * i], [10, -1.5 * i], [10, -1.5 * i - 1], [0, -1.5 * i - 1], true ]); grid( [0, 10], [-1.5 * i, -1.5 * i - 1], { strokeWidth: 1 } ).translate( -0.5, 0 ); } @@ -70,7 +70,7 @@ stroke: "#4e74ba" }); - for ( var i = 0; i < A; i++ ) { + for ( var i = 0; i < A; i++ ) { path([ [10.5 * i + 0, 0], [10.5 * i + 0, 10], [10.5 * i + 10, 10], [10.5 * i + 10, 0], true ]); grid( [0, 10], [0, 10], { strokeWidth: 1 } ).translate( 28 * 10.5 * i - 0.5, 0 ); } @@ -84,7 +84,7 @@

By counting the number of hundreds blocks, we see that the hundreds digit of the number is A.

- for ( var i = 0; i < A; i++ ) { + for ( var i = 0; i < A; i++ ) { label( [10.5 * i + 5, 5], "\\large{\\mathbf{100}}", { color: "black", background: "#a2bff4" } ); }
@@ -94,7 +94,7 @@

By counting the number of tens blocks, we see that the tens digit of the number is B.

- for ( var i = 0; i < B; i++ ) { + for ( var i = 0; i < B; i++ ) { label( [5, -1.5 * i - 0.6], "\\large{\\mathbf{1\\:0}}", { color: "black" } ); }
@@ -104,7 +104,7 @@

By counting the number of single unit blocks, we see that the units digit of the number is C.

- for ( var i = 0; i < C; i++ ) { + for ( var i = 0; i < C; i++ ) { label( [1.5 * i + 0.5, 0.5], "\\mathbf{1}", { color: "black" } ); }
24 exercises/scaling_vectors.html
 @@ -17,7 +17,7 @@ } else { var t = cross( qx - px, qy - py, sx, sy ) / cross( rx, ry, sx, sy ); var u = cross( qx - px, qy - py, rx, ry ) / cross( rx, ry, sx, sy ); - return 0 <= t && t <= 1 && 0 <= u && u <= 1; + return 0 <= t && t <= 1 && 0 <= u && u <= 1; } } @@ -27,7 +27,7 @@
randRangeNonZero( -3, 3 ) randRangeNonZero( -3, 3 ) - randRangeNonZero( -1, 1 ) * randRange( 2, 3 ) + randRangeNonZero( -1, 1 ) * randRange( 2, 3 ) randRangeNonZero( -7, 7 ) randRangeNonZero( -7, 7 ) @@ -52,14 +52,14 @@ SHUF[2] SHUF[3] - randRangeNonZero( -9, 9 ) - randRangeNonZero( -9, 9 ) - randRangeNonZero( -9, 9 ) - randRangeNonZero( -9, 9 ) - randRangeNonZero( -9, 9 ) - randRangeNonZero( -9, 9 ) - randRangeNonZero( -9, 9 ) - randRangeNonZero( -9, 9 ) + randRangeNonZero( -9, 9 ) + randRangeNonZero( -9, 9 ) + randRangeNonZero( -9, 9 ) + randRangeNonZero( -9, 9 ) + randRangeNonZero( -9, 9 ) + randRangeNonZero( -9, 9 ) + randRangeNonZero( -9, 9 ) + randRangeNonZero( -9, 9 )
@@ -72,7 +72,7 @@ range: 10, scale: 20, tickStep: 1, - axisArrows: "<->" + axisArrows: "<->" }); style({ @@ -84,7 +84,7 @@ do { var AOX = randRange( -9, 9 ); var AOY = randRange( -9, 9 ); - } while ( 0 < abs( AOX + AX ) && abs( AOX + AX ) < 9 ); + } while ( 0 < abs( AOX + AX ) && abs( AOX + AX ) < 9 ); line( [0, 0], [AX, AY], { arrows: "->" } ); label( [AF * AX, AF * AY], "\\vec a" );
12 exercises/signs_of_a_parabola.html
 @@ -6,7 +6,7 @@
-
+
randRange( -5, 5 ) @@ -44,8 +44,8 @@

a is (A > 0) ? 'positive' : 'negative'

-

b is (B > 0) ? 'positive' : ( (B < 0) ? 'negative' : 'zero' )

-

c is (C > 0) ? 'positive' : ( (C < 0) ? 'negative' : 'zero' )

+

b is (B > 0) ? 'positive' : ( (B < 0) ? 'negative' : 'zero' )

+

c is (C > 0) ? 'positive' : ( (C < 0) ? 'negative' : 'zero' )

@@ -54,15 +54,15 @@

The parabola is ( A > 0) ? "smiling" : "frowning" thus a is ( A > 0 ) ? "positive" : "negative".

The number c determines where the parabola intersects the y-axis. Is the positive or negative part?

If the parabola intersected the positive part of the y-axis, then c would be positive.

-

The parabola intersects the y-axis in the point (0,c) = (0,C), thus c is ( C > 0 ) ? 'positive' : ( (C<0) ? 'negative' : 'zero' ).

+

The parabola intersects the y-axis in the point (0,c) = (0,C), thus c is ( C > 0 ) ? 'positive' : ( (C < 0) ? 'negative' : 'zero' ).

The number b determines how the parabola intersects the y-axis. Imagine the tangent at the intersection. What is the slope?

style({ stroke: "#FF8800", strokeWidth: 2}); line( [ -10, F( -10 )], [ 10, F( 10 )]);

The tangent where the parabola intersects the y-axis was drawn in orange. The number b is the slope.

-

The tangent has a (B > 0) ? 'positive' : ( (B < 0) ? 'negative' : 'zero' ) slope, so b is (B > 0) ? 'positive' : ( (B < 0) ? 'negative' : 'zero' ).

-

a is ( A > 0 ) ? "positive" : "negative", b is (B > 0) ? 'positive' : ( (B < 0) ? 'negative' : 'zero' ), and c is (C > 0) ? 'positive' : ( (C < 0) ? 'negative' : 'zero' ).

+

The tangent has a (B > 0) ? 'positive' : ( (B < 0) ? 'negative' : 'zero' ) slope, so b is (B > 0) ? 'positive' : ( (B < 0) ? 'negative' : 'zero' ).

+

a is ( A > 0 ) ? "positive" : "negative", b is (B > 0) ? 'positive' : ( (B < 0) ? 'negative' : 'zero' ), and c is (C > 0) ? 'positive' : ( (C < 0) ? 'negative' : 'zero' ).

6 exercises/slope_of_a_line.html
 @@ -63,7 +63,7 @@ }); style({ fill: BLUE, stroke: BLUE }); line( [ -1,-1 ], [ 1,4 ] ); - label([0,-4], "\\color{BLUE}{\\text{Airplane Taking Off}}", "below"); + label([0,-4], "\\color{" + BLUE + "}{\\text{Airplane Taking Off}}", "below");
graphInit({ @@ -74,7 +74,7 @@ }); style({ fill: GREEN, stroke: GREEN }); line( [ 0, 2 ], [ 2, -1 ] ); - label([0,-4], "\\color{GREEN}{\\text{Airplane Landing}}", "below"); + label([0,-4], "\\color{" + GREEN + "}{\\text{Airplane Landing}}", "below");
@@ -146,7 +146,7 @@ }); style({ stroke: COLORS[index].hex }); - label([0,-6], "\\color{" + COLORS[index].hex + "}" + + label([0,-6], "\\color{" + COLORS[index].hex + "}" + "{\\text{" + COLORS[index].name + "}}", "below"); plot(function( x ) { return ( x - 1 ) * SLOPES[index].value + B;
2 exercises/subtraction_1.html
 @@ -21,7 +21,7 @@ }); label( [0, 0], - "\\Huge{\\color{#6495ED}{ A } - \\color{#FFA500}{ B } = {?}}", + "\\Huge{\\color{#6495ED}{" + A + "} - \\color{#28AE7B}{" + B + "} = {?}}", "right" );