Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Whitespace :)

  • Loading branch information...
commit c2cb4db0ebe89f33067e0104cc3b7d62edb6964b 1 parent a897b82
@spicyj spicyj authored
Showing with 1,037 additions and 1,042 deletions.
  1. +3 −3 build/kathjax-config.js
  2. +39 −39 exercises/adding_and_subtracting_decimals_word_problems.html
  3. +2 −2 exercises/adding_and_subtracting_negative_numbers.html
  4. +6 −6 exercises/adding_and_subtracting_polynomials.html
  5. +1 −1  exercises/adding_and_subtracting_radicals.html
  6. +1 −1  exercises/adding_negative_numbers.html
  7. +1 −1  exercises/addition_2.html
  8. +29 −29 exercises/addition_rule_of_probability.html
  9. +2 −2 exercises/age_word_problems.html
  10. +21 −21 exercises/angle_bisector_theorem.html
  11. +2 −2 exercises/angle_types.html
  12. +123 −123 exercises/angles_1.html
  13. +1 −1  exercises/angles_of_a_polygon.html
  14. +3 −3 exercises/arithmetic_word_problems_2.html
  15. +2 −2 exercises/changing_decimals_to_percents.html
  16. +2 −2 exercises/changing_fractions_to_decimals_1.html
  17. +1 −1  exercises/changing_percents_to_decimals.html
  18. +2 −2 exercises/changing_percents_to_fractions.html
  19. +17 −17 exercises/circles_1.html
  20. +3 −3 exercises/circumradius.html
  21. +2 −2 exercises/comparing_absolute_values.html
  22. +1 −1  exercises/complementary_angles.html
  23. +1 −1  exercises/completing_the_square_1.html
  24. +1 −1  exercises/completing_the_square_2.html
  25. +12 −12 exercises/compound_inequalities.html
  26. +10 −10 exercises/congruent_triangles_1.html
  27. +4 −4 exercises/congruent_triangles_2.html
  28. +2 −2 exercises/converting_decimals_to_fractions_1.html
  29. +1 −1  exercises/converting_decimals_to_fractions_2.html
  30. +1 −1  exercises/converting_decimals_to_percents.html
  31. +3 −3 exercises/converting_mixed_numbers_and_improper_fractions.html
  32. +1 −1  exercises/converting_percents_to_decimals.html
  33. +1 −1  exercises/converting_repeating_decimals_to_fractions_1.html
  34. +1 −1  exercises/converting_repeating_decimals_to_fractions_2.html
  35. +3 −3 exercises/decimals_on_the_number_line.html
  36. +1 −1  exercises/distance_formula.html
  37. +246 −246 exercises/distributive_property_with_variables.html
  38. +4 −4 exercises/divisibility_0.5.html
  39. +4 −4 exercises/equivalent_fractions.html
  40. +5 −5 exercises/equivalent_fractions_2.html
  41. +1 −1  exercises/estimation_with_decimals.html
  42. +1 −1  exercises/evaluating_expressions_2.html
  43. +2 −2 exercises/even_and_odd_integers.html
  44. +2 −2 exercises/fractions_cut_and_copy_1.html
  45. +5 −5 exercises/fractions_cut_and_copy_2.html
  46. +7 −7 exercises/fractions_on_the_number_line.html
  47. +1 −1  exercises/graphing_points_2.html
  48. +4 −4 exercises/herons_formula.html
  49. +1 −1  exercises/inequalities_on_a_number_line.html
  50. +3 −3 exercises/interpreting_linear_equations.html
  51. +5 −5 exercises/kinematic_equations.html
  52. +5 −5 exercises/line_relationships.html
  53. +4 −4 exercises/linear_equation_word_problems.html
  54. +1 −1  exercises/measuring_angles.html
  55. +1 −1  exercises/multiplication_0.5.html
  56. +4 −4 exercises/multiplying_expressions_1.html
  57. +11 −11 exercises/multiplying_polynomials.html
  58. +1 −1  exercises/multiplying_radicals.html
  59. +1 −1  exercises/one_step_equations.html
  60. +6 −6 exercises/one_step_equations_0.5.html
  61. +2 −2 exercises/parabola_intuition_1.html
  62. +1 −1  exercises/parabola_intuition_2.html
  63. +1 −1  exercises/plugging_in_values.html
  64. +2 −2 exercises/point_slope_form.html
  65. +24 −24 exercises/polygon_intuition.html
  66. +2 −2 exercises/quadratic_equation.html
  67. +7 −7 exercises/quadratic_inequalities_1.html
  68. +23 −23 exercises/quadrilateral_angles.html
  69. +7 −7 exercises/quadrilateral_types.html
  70. +1 −1  exercises/rate_problems_2.html
  71. +1 −1  exercises/recognizing_percents.html
  72. +2 −2 exercises/recognizing_rays_lines_and_line_segments.html
  73. +3 −3 exercises/rounding_numbers.html
  74. +4 −4 exercises/similar_triangles_1.html
  75. +5 −5 exercises/solutions_to_systems_of_equations.html
  76. +1 −1  exercises/special_derivatives.html
  77. +9 −9 exercises/squares_and_rectangles.html
  78. +2 −2 exercises/systems_of_equations_with_elimination.html
  79. +5 −5 exercises/systems_of_equations_with_elimination_0.5.html
  80. +6 −6 exercises/systems_of_equations_with_substitution.html
  81. +9 −9 exercises/triangle_angles_1.html
  82. +1 −1  exercises/trig_identities_1.html
  83. +2 −2 exercises/trigonometry_2.html
  84. +1 −1  exercises/writing_expressions_2.html
  85. +106 −106 jquery-ui.js
  86. +54 −55 jquery.js
  87. +0 −1  test/exercises/power_rule.js
  88. +3 −3 utils/answer-types.js
  89. +11 −11 utils/convert-values.js
  90. +38 −38 utils/exercise_maker.html
  91. +5 −5 utils/exponents.js
  92. +5 −5 utils/expressions.js
  93. +36 −37 utils/graphie-geometry.js
  94. +0 −1  utils/graphie-helpers-arithmetic.js
  95. +3 −3 utils/graphie-helpers.js
  96. +1 −1  utils/graphie-polygon.js
  97. +2 −2 utils/graphie.js
  98. +2 −3 utils/math-format.js
  99. +6 −6 utils/math.js
  100. +9 −9 utils/polynomials.js
  101. +1 −1  utils/slice-clone.js
  102. +3 −3 utils/spin.js
View
6 build/kathjax-config.js
@@ -62,7 +62,7 @@ MathJax.Ajax.timeout = 60 * 1000;
MathJax.Ajax.loadError = (function( oldLoadError ) {
return function( file ) {
Khan.warnTimeout();
- // Otherwise will receive unresponsive script error when finally finish loading
+ // Otherwise will receive unresponsive script error when finally finish loading
MathJax.Ajax.loadComplete = function( file ) { };
oldLoadError.call( this, file );
};
@@ -84,9 +84,9 @@ MathJax.Message.Init = (function( oldInit ) {
}
}
}
-
+
oldInit.call( this, styles );
};
})( MathJax.Message.Init );
-MathJax.Hub.Startup.onload();
+MathJax.Hub.Startup.onload();
View
78 exercises/adding_and_subtracting_decimals_word_problems.html
@@ -9,7 +9,7 @@
<div class="exercise">
<div class="problems">
<div>
-
+
<div class="vars">
<var id="A">randRange(5,9)*100</var>
<var id="B">randRange(1,9)*10</var>
@@ -23,16 +23,16 @@
<var id="fruit_2_integer">D+E+F</var>
<var id="fruit_2_decimal">(2)</var>
<var id="fruit_2">truncate_to_max(fruit_2_integer*pow(10,-fruit_2_decimal), 2)</var>
- <var id="solution">truncate_to_max((fruit_1+fruit_2),2)</var>
+ <var id="solution">truncate_to_max((fruit_1+fruit_2),2)</var>
<var id="DUMMY">[]</var>
</div>
- <div class="question spin">
+ <div class="question spin">
<p>{On a sunny morning|On a beautiful afternoon}, <var>person(1)</var> rode <var>his(1)</var> bicycle to a farm that sold bags of <var>plural(fruit(1))</var> for $<var>fruit_1</var> each and bags of <var>plural(fruit(2))</var> for $<var>fruit_2</var> each.</p>
<p><var>person(1)</var> decided to buy a bag of <var>plural(fruit(1))</var> and a bag of <var>plural(fruit(2))</var> {before heading home|because those were <var>his(1)</var> favorite kinds of fruit|}.</p>
<p class="question">How much did <var>person(1)</var> need to pay for <var>his(1)</var> produce?</p></div>
-
-
+
+
<div class="solution"><var>fruit_1+fruit_2</var></div>
<div class="hints">
@@ -46,13 +46,13 @@
<div class="graphie" data-update="numbers" data-each="DecimalAdder.numHintsFor( fruit_1_integer, fruit_1_decimal, fruit_2_integer, fruit_2_decimal ) times">
graph.adder.showHint();
</div>
-
+
<p class="solution"><var>person(1)</var> needs to pay $<var>solution</var>.</p>
</div>
</div>
-
+
<div>
-
+
<div class="vars">
<var id="meters">randRange(1, 3)*100</var>
<var id="time_1_integer">randRange(2000,9999)</var>
@@ -65,9 +65,9 @@
<var id="time_3_decimal">(2)</var>
<var id="time_3">truncate_to_max(time_3_integer*pow(10,-time_3_decimal), 2)</var>
<var id="DUMMY">[]</var>
- <var id="solution">truncate_to_max((time_1-time_2),2)</var>
+ <var id="solution">truncate_to_max((time_1-time_2),2)</var>
</div>
-
+
<div class="question spin">
<p>{On Monday|Last week}, <var>person(1)</var> and <var>person(2)</var> decided to see how fast they could sprint <var>meters</var> meters. They asked their friend <var>person(3)</var> to time them with a stopwatch.</p>
<p>{After <var>time_3</var> minutes, <var>person(3)</var> agreed to time the runners</var>.|} <var>person(1)</var> sprinted first and ran <var>meters</var> meters in <var>time_1</var> seconds. When it was <var>person(2)</var>'s turn, <var>he(2)</var> sped off and completed the run in <var>time_2</var> seconds.</p>
@@ -89,10 +89,10 @@
<p class="solution"><var>person(2)</var> was <var>solution</var> seconds faster than <var>person(1)</var>.</p>
</div>
</div>
-
+
<div>
-
-
+
+
<div class="vars">
<var id="G">randRange(2,6)*100</var>
<var id="H">randRange(1,9)*10</var>
@@ -108,16 +108,16 @@
<var id="weight_2">truncate_to_max(weight_2_integer*pow(10,-weight_2_decimal), 2)</var>
<var id="height_1">randRange(16.5,22.5)</var>
<var id="height_2">randRange(16.5,22.5)</var>
- <var id="solution">truncate_to_max((weight_1+weight_2),2)</var>
+ <var id="solution">truncate_to_max((weight_1+weight_2),2)</var>
<var id="DUMMY">[]</var>
</div>
<div class="question spin">
<p>{Last Monday|On Saturday}, <var>person(1)</var>'s parents gave birth to twins and named them <var>person(2)</var> and <var>person(3)</var>. When they were first born, <var>person(2)</var> weighed <var>weight_1</var> pounds{ and was <var>height_1</var> inches tall|}, and <var>person(3)</var> weighed <var>weight_2</var> pounds {and was <var>height_2</var> inches tall|}.</p>
<p class="question">How much did the babies weigh in total?</p>
-
- </div>
-
+
+ </div>
+
<div class="solution"><var>weight_1+weight_2</var></div>
<div class="hints">
@@ -131,17 +131,17 @@
<div class="graphie" data-update="numbers" data-each="DecimalAdder.numHintsFor( weight_1_integer, weight_1_decimal, weight_2_integer, weight_2_decimal ) times">
graph.adder.showHint();
</div>
-
+
<div class="graphie" data-update="numbers" data-each="DUMMY as dummy">
graph.adder.showHint();</div>
<p class="solution">Together, the babies weigh <var>solution</var> pounds.</p>
</div>
</div>
-
-
+
+
<div>
-
-
+
+
<div class="vars">
<var id="M">randRange(1,9)*100</var>
<var id="N">randRange(1,9)*10</var>
@@ -156,7 +156,7 @@
<var id="price_1_decimal">(2)</var>
<var id="price_1">truncate_to_max(price_1_integer*pow(10,-price_1_decimal), 2)</var>
<var id="time_1">randRange(3, 30)</var>
- <var id="solution">truncate_to_max((amount_paid-price_1),2)</var>
+ <var id="solution">truncate_to_max((amount_paid-price_1),2)</var>
<var id="DUMMY">[]</var>
</div>
@@ -180,10 +180,10 @@
<p class="solution"><var>person(1)</var> received $<var>solution</var> in change.</p>
</div>
</div>
-
+
<div>
-
-
+
+
<div class="vars">
<var id="rain_1_integer">randRange(101,999)</var>
<var id="rain_1_decimal">(2)</var>
@@ -193,11 +193,11 @@
<var id="rain_2">truncate_to_max(rain_2_integer*pow(10,-rain_2_decimal), 2)</var>
<var id="snow_1">randRange(2.1,15.89)</var>
<var id="DUMMY">[]</var>
- <var id="solution">truncate_to_max((rain_2-rain_1),2)</var>
+ <var id="solution">truncate_to_max((rain_2-rain_1),2)</var>
</div>
<div class="question spin">
- <p>During a recent rainstorm, <var>rain_1</var> inches of rain fell in <var>person(1)</var>'s hometown, and <var>rain_2</var> inches of rain fell in <var>person(2)</var>'s hometown. {During the same storm, <var>snow_1</var> inches of snow fell in <var>person(3)</var>'s hometown.|}</p>
+ <p>During a recent rainstorm, <var>rain_1</var> inches of rain fell in <var>person(1)</var>'s hometown, and <var>rain_2</var> inches of rain fell in <var>person(2)</var>'s hometown. {During the same storm, <var>snow_1</var> inches of snow fell in <var>person(3)</var>'s hometown.|}</p>
<p class="question">How much more rain fell in <var>person(2)</var>'s town than in <var>person(1)</var>'s town?</p>
</div>
<div class="solution"><var>rain_2-rain_1</var></div>
@@ -216,10 +216,10 @@
<p class="solution"><var>person(2)</var>'s town received <var>solution</var> inches more rain than <var>person(1)</var>'s town.</p>
</div>
</div>
-
-
+
+
<div>
-
+
<div class="vars">
<var id="distance_1_integer">randRange(100,2000)</var>
<var id="distance_1_decimal">(2)</var>
@@ -227,7 +227,7 @@
<var id="distance_2_integer" data-ensure="distance_1_integer>distance_2_integer">randRange(100,2000)</var>
<var id="distance_2_decimal">(2)</var>
<var id="distance_2">truncate_to_max(distance_2_integer*pow(10,-distance_2_decimal), 2)</var>
- <var id="solution">truncate_to_max((distance_1+distance_2),2)</var>
+ <var id="solution">truncate_to_max((distance_1+distance_2),2)</var>
<var id="time_1">randRange(20.2,52.17)</var>
<var id="DUMMY">[]</var>
</div>
@@ -235,7 +235,7 @@
<div class="question spin">
<p>{To get to school each morning|To get to work each morning|To visit <var>his(1)</var> grandmother}, <var>person(1)</var> takes <var>an(vehicle(1))</var> <var>distance_1</var> <var>plural(distance(1))</var> and <var>an(vehicle(2))</var> <var>distance_2</var> <var>plural(distance(1))</var>. {In total, the journey takes <var>time_1</var> minutes.|}</p>
<p class="question">How many <var>plural(distance(1))</var> is <var>person(1)</var>'s journey in total?</p>
- </div>
+ </div>
<div class="solution"><var>distance_1+distance_2</var></div>
<div class="hints">
@@ -249,17 +249,17 @@
<div class="graphie" data-update="numbers" data-each="DecimalAdder.numHintsFor( distance_1_integer, distance_1_decimal, distance_2_integer, distance_2_decimal ) times">
graph.adder.showHint();
</div>
-
+
<div class="graphie" data-update="numbers" data-each="DUMMY as dummy">
graph.adder.showHint();</div>
<p class="solution"><var>person(1)</var> travels <var>solution</var> <var>plural(distance(1))</var> in total.</p>
</div>
</div>
</div>
-
-
-
-
+
+
+
+
</body>
-
+
</html>
View
4 exercises/adding_and_subtracting_negative_numbers.html
@@ -57,7 +57,7 @@
<div class="graphie" data-update="numbers">
REMOVE.remove();
label( [0, -1],
- "\\Huge{\\color{#6495ED}{" + A + "} \\color{#28AE7B}{" + B + "} = "
+ "\\Huge{\\color{#6495ED}{" + A + "} \\color{#28AE7B}{" + B + "} = "
+ "\\color{#FF00AF}{" + ANSWER + "}}",
"right" );
</div>
@@ -107,7 +107,7 @@
<div class="graphie" data-update="numbers">
REMOVE.remove();
label( [0, -1],
- "\\Huge{\\color{#6495ED}{" + A + "} \\color{#28AE7B}{ +" + abs( B ) + "} = "
+ "\\Huge{\\color{#6495ED}{" + A + "} \\color{#28AE7B}{ +" + abs( B ) + "} = "
+ "\\color{#FF00AF}{" + ANSWER + "}}",
"right" );
</div>
View
12 exercises/adding_and_subtracting_polynomials.html
@@ -8,7 +8,7 @@
function getFakeAnswers( solution ) {
var answers = [];
for ( var i = 0; i < solution.getNumberOfTerms(); i++ ) {
- var coefs = [];
+ var coefs = [];
for ( var j = 0; j < solution.getNumberOfTerms(); j++ ) {
var term = solution.getCoefAndDegreeForTerm( j );
@@ -16,15 +16,15 @@
if ( i === j ) {
coefs[ term.degree ] = KhanUtil.randRangeNonZero( -7, 7 );
} else {
- coefs[ term.degree ] = term.coef;
+ coefs[ term.degree ] = term.coef;
}
}
-
+
for ( var j = 0; j < coefs.length; j++ ) {
if ( coefs[ j ] === undefined ) {
coefs[ j ] = 0;
}
- }
+ }
answers.push( new KhanUtil.Polynomial(0, solution.maxDegree, coefs, solution.variable) );
}
@@ -48,7 +48,7 @@
if ( i === NON_ZERO_INDICES[ j ] ) {
value = randRangeNonZero( -7, 7 );
break;
- }
+ }
}
coefs[ i ] = value;
}
@@ -61,7 +61,7 @@
<div id="add">
<div class="vars">
<var id="SIGN">"+"</var>
- <var id="SOLUTION">POL_1.add( POL_2 )</var>
+ <var id="SOLUTION">POL_1.add( POL_2 )</var>
<var id="FAKE_ANSWERS">getFakeAnswers( SOLUTION )</var>
</div>
View
2  exercises/adding_and_subtracting_radicals.html
@@ -108,4 +108,4 @@
</div>
</div>
</body>
-</html>
+</html>
View
2  exercises/adding_negative_numbers.html
@@ -57,7 +57,7 @@
<div class="graphie" data-update="numbers">
REMOVE.remove();
label( [0, -2],
- "\\Huge{\\color{#6495ED}{" + A + "} \\color{#28AE7B}{" + B + "} = "
+ "\\Huge{\\color{#6495ED}{" + A + "} \\color{#28AE7B}{" + B + "} = "
+ "\\color{#FF00AF}{" + ANSWER + "}}",
"right" );
</div>
View
2  exercises/addition_2.html
@@ -12,7 +12,7 @@
<var id="A_1">randRange ( 0, 9 )*1</var>
<var id="B_10" data-ensure="B_10+A_10<100">randRange( 1, 8 )*10</var>
<var id="B_1" data-ensure="B_1+A_1<10">randRange ( 0, 9 )*1</var>
-
+
<var id="A">A_10+A_1</var>
<var id="B">B_10+B_1</var>
<var id="DUMMY">[]</var>
View
58 exercises/addition_rule_of_probability.html
@@ -8,7 +8,7 @@
function enFunc(innerString, usePercentages) {
if (usePercentages)
return "<code>P(</code>" + innerString + "<code>)</code>";
- else
+ else
return "<code>\\lvert</code>" + innerString + "<code>\\rvert</code>";
}
</script>
@@ -19,15 +19,15 @@
<div>
<div class="vars">
<var id="VARINDX_X, VARINDX_Y, VARINDX_X_OR_Y, VARINDX_X_AND_Y">[0, 1, 2, 3]</var>
- <var id="CHOOSE_ATTRIBUTES">
+ <var id="CHOOSE_ATTRIBUTES">
function( attrChoices1, attrChoices2 ) {
att1 = randFromArray( attrChoices1 );
att2 = randFromArray( attrChoices2 );
return [ att1, att2, att1 + " or " + att2, att1 + " and " + att2 ];
- }
+ }
</var>
<var id="MIXTEST">[ "baseline", MIXER( ["blue"], ["hot"] ), "endline" ]</var>
- <var id="INTRO, VARDESC, QSTNPRETEXT, QSTNPOSTTEXT, USEPERCENTAGES">
+ <var id="INTRO, VARDESC, QSTNPRETEXT, QSTNPOSTTEXT, USEPERCENTAGES">
<!-- Put each question in the following structure: [INTRO, [X DESC, Y DESC, X_OR_Y DESC, X_AND_Y DESC], QSTNPRETEXT, QSTNPOSTTEXT, USEPERCENTAGES] -->
randFromArray([
["A local store ran a sale on two items, a watch and a shirt. There were ", ["customers who bought a watch", "customers who bought a shirt", "customers who bought a watch or a shirt", "customers who bought a watch and a shirt"], "What was the number of ", "?", false],
@@ -42,65 +42,65 @@
<var id="ORDER">shuffle( [0, 1, 2, 3] )</var>
<!-- Assign values to each variable, subject to constraints so all counts are > 1 and no counts are negative -->
<var id="VARVALS">
- ( function( usePercentages ) {
+ ( function( usePercentages ) {
var rangemin = usePercentages ? 1 : 2;
- var rangemax = usePercentages ? 100 : 10;
- var vals = [0, 0, 0, 0];
- vals[VARINDX_X] = randRange( rangemin, rangemax );
+ var rangemax = usePercentages ? 100 : 10;
+ var vals = [0, 0, 0, 0];
+ vals[VARINDX_X] = randRange( rangemin, rangemax );
vals[VARINDX_Y] = randRange( rangemin, rangemax );
vals[VARINDX_X_AND_Y] = randRange( max( rangemin, vals[VARINDX_X]+vals[VARINDX_Y]-100 ), min( vals[VARINDX_X], vals[VARINDX_Y] ) );
vals[VARINDX_X_OR_Y] = vals[VARINDX_X] + vals[VARINDX_Y] - vals[VARINDX_X_AND_Y];
return vals;
} )( USEPERCENTAGES )
- </var>
+ </var>
<var id="QUESTIONTEXT">
- ( function() {
- var optionalPercentage = USEPERCENTAGES ? "% are " : " ";
+ ( function() {
+ var optionalPercentage = USEPERCENTAGES ? "% are " : " ";
var qstn = INTRO;
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 += QSTNPRETEXT + VARDESC[ORDER[ORDER.length-1]] + QSTNPOSTTEXT;
return qstn;
} )()
- </var>
+ </var>
<!-- this just passes the call to plain JS to avoid problems with unescaped HTML in the function body, while still giving access to vars -->
<var id="ENFUNC"> function (innerString) { return enFunc(innerString, USEPERCENTAGES); } </var>
-
+
</div>
<div class="question"><p><var>QUESTIONTEXT</var></p></div>
<div class="solution"><var>VARVALS[ORDER[ORDER.length-1]]</var></div>
<div class="hints">
<p>Remember the addition rule of probability: <code>P(A\cup B) = P(A) + P(B) - P(A\cap B)</code></p>
- <p data-if="USEPERCENTAGES === false">Because the denominator of the fraction for each probability is the same, for convenience we can also just use cardinality (the number of items in each category) instead of probability: <code>|A\cup B| = |A|+ |B| - |A\cap B|</code></p>
+ <p data-if="USEPERCENTAGES === false">Because the denominator of the fraction for each probability is the same, for convenience we can also just use cardinality (the number of items in each category) instead of probability: <code>|A\cup B| = |A|+ |B| - |A\cap B|</code></p>
<!-- substitute english descriptions for variables -->
<p>Substituting variables, <var>ENFUNC(VARDESC[2])</var> = <var>ENFUNC(VARDESC[0])</var> + <var>ENFUNC(VARDESC[1])</var> - <var>ENFUNC(VARDESC[3])</var></p>
<!-- rearrange the unknown to the left hand side IF it wasn't already -->
- <p data-if="ORDER[ORDER.length-1] === 0">Rearranging, <var>ENFUNC(VARDESC[0])</var> = <var>ENFUNC(VARDESC[3])</var> + <var>ENFUNC(VARDESC[2])</var> - <var>ENFUNC(VARDESC[1])</var></p>
- <p data-if="ORDER[ORDER.length-1] === 1">Rearranging, <var>ENFUNC(VARDESC[1])</var> = <var>ENFUNC(VARDESC[3])</var> + <var>ENFUNC(VARDESC[2])</var> - <var>ENFUNC(VARDESC[0])</var></p>
- <p data-if="ORDER[ORDER.length-1] === 3">Rearranging, <var>ENFUNC(VARDESC[3])</var> = <var>ENFUNC(VARDESC[0])</var> + <var>ENFUNC(VARDESC[1])</var> - <var>ENFUNC(VARDESC[2])</var></p>
+ <p data-if="ORDER[ORDER.length-1] === 0">Rearranging, <var>ENFUNC(VARDESC[0])</var> = <var>ENFUNC(VARDESC[3])</var> + <var>ENFUNC(VARDESC[2])</var> - <var>ENFUNC(VARDESC[1])</var></p>
+ <p data-if="ORDER[ORDER.length-1] === 1">Rearranging, <var>ENFUNC(VARDESC[1])</var> = <var>ENFUNC(VARDESC[3])</var> + <var>ENFUNC(VARDESC[2])</var> - <var>ENFUNC(VARDESC[0])</var></p>
+ <p data-if="ORDER[ORDER.length-1] === 3">Rearranging, <var>ENFUNC(VARDESC[3])</var> = <var>ENFUNC(VARDESC[0])</var> + <var>ENFUNC(VARDESC[1])</var> - <var>ENFUNC(VARDESC[2])</var></p>
<!-- substitue vals for vars on RHS -->
- <p data-if="ORDER[ORDER.length-1] === 0"><var>ENFUNC(VARDESC[0])</var> = <code><var>VARVALS[3]</var> + <var>VARVALS[2]</var> - <var>VARVALS[1]</var></code>
- <p data-if="ORDER[ORDER.length-1] === 1"><var>ENFUNC(VARDESC[1])</var> = <code><var>VARVALS[3]</var> + <var>VARVALS[2]</var> - <var>VARVALS[0]</var></code>
- <p data-if="ORDER[ORDER.length-1] === 2"><var>ENFUNC(VARDESC[2])</var> = <code><var>VARVALS[0]</var> + <var>VARVALS[1]</var> - <var>VARVALS[3]</var></code>
- <p data-if="ORDER[ORDER.length-1] === 3"><var>ENFUNC(VARDESC[3])</var> = <code><var>VARVALS[0]</var> + <var>VARVALS[1]</var> - <var>VARVALS[2]</var></code>
+ <p data-if="ORDER[ORDER.length-1] === 0"><var>ENFUNC(VARDESC[0])</var> = <code><var>VARVALS[3]</var> + <var>VARVALS[2]</var> - <var>VARVALS[1]</var></code>
+ <p data-if="ORDER[ORDER.length-1] === 1"><var>ENFUNC(VARDESC[1])</var> = <code><var>VARVALS[3]</var> + <var>VARVALS[2]</var> - <var>VARVALS[0]</var></code>
+ <p data-if="ORDER[ORDER.length-1] === 2"><var>ENFUNC(VARDESC[2])</var> = <code><var>VARVALS[0]</var> + <var>VARVALS[1]</var> - <var>VARVALS[3]</var></code>
+ <p data-if="ORDER[ORDER.length-1] === 3"><var>ENFUNC(VARDESC[3])</var> = <code><var>VARVALS[0]</var> + <var>VARVALS[1]</var> - <var>VARVALS[2]</var></code>
<!-- give the final answer -->
- <p data-if="ORDER[ORDER.length-1] === 0"><var>ENFUNC(VARDESC[0])</var> = <code><var>VARVALS[3] + VARVALS[2] - VARVALS[1]</var></code>
- <p data-if="ORDER[ORDER.length-1] === 1"><var>ENFUNC(VARDESC[1])</var> = <code><var>VARVALS[3] + VARVALS[2] - VARVALS[0]</var></code>
- <p data-if="ORDER[ORDER.length-1] === 2"><var>ENFUNC(VARDESC[2])</var> = <code><var>VARVALS[0] + VARVALS[1] - VARVALS[3]</var></code>
- <p data-if="ORDER[ORDER.length-1] === 3"><var>ENFUNC(VARDESC[3])</var> = <code><var>VARVALS[0] + VARVALS[1] - VARVALS[2]</var></code>
+ <p data-if="ORDER[ORDER.length-1] === 0"><var>ENFUNC(VARDESC[0])</var> = <code><var>VARVALS[3] + VARVALS[2] - VARVALS[1]</var></code>
+ <p data-if="ORDER[ORDER.length-1] === 1"><var>ENFUNC(VARDESC[1])</var> = <code><var>VARVALS[3] + VARVALS[2] - VARVALS[0]</var></code>
+ <p data-if="ORDER[ORDER.length-1] === 2"><var>ENFUNC(VARDESC[2])</var> = <code><var>VARVALS[0] + VARVALS[1] - VARVALS[3]</var></code>
+ <p data-if="ORDER[ORDER.length-1] === 3"><var>ENFUNC(VARDESC[3])</var> = <code><var>VARVALS[0] + VARVALS[1] - VARVALS[2]</var></code>
</div>
- </div>
+ </div>
</div>
</div>
</body>
</html>
-
-
+
+
View
4 exercises/age_word_problems.html
@@ -17,8 +17,8 @@
<div class="question">
<p class="spin">
- {<var>person(1)</var> is <var>A</var> years older than <var>person(2)</var>|<var>person(2)</var> is <var>A</var> years younger than <var>person(1)</var>}.
- {For the last {four|3|two} years, <var>person(1)</var> and <var>person(2)</var> have been going to the same school.|<var>person(1)</var> and <var>person(2)</var> first met 3 years ago.|}
+ {<var>person(1)</var> is <var>A</var> years older than <var>person(2)</var>|<var>person(2)</var> is <var>A</var> years younger than <var>person(1)</var>}.
+ {For the last {four|3|two} years, <var>person(1)</var> and <var>person(2)</var> have been going to the same school.|<var>person(1)</var> and <var>person(2)</var> first met 3 years ago.|}
<var>Cardinal(B)</var> years ago, <var>person(1)</var> was <var>C</var> times {as old as|older than} <var>person(2)</var>.</p>
<p>How old is <var>person(1)</var> now?</p>
View
42 exercises/angle_bisector_theorem.html
@@ -13,15 +13,15 @@
<var id="SIDES_C">[ [ 1 ], [ 2] ]</var>
<var id="TR_A">
function(){
- var trA = new Triangle( [ 5, -8 ], ANGLES , 14 , {} );
+ var trA = new Triangle( [ 5, -8 ], ANGLES , 14 , {} );
trA.boxOut( [ [ [ 0, -10 ], [ 0, 10 ] ] ], [ 0.4 , 0 ] );
trA.boxOut( [ [ [ 11 , -10 ], [ 11, 10 ] ] ], [ -0.4 , 0 ] );
return trA;
}()
- </var>
+ </var>
<var id="POINT_D">
function(){
- var pointD = findIntersection( bisectAngle( TR_A.sides[ 0 ], reverseLine( TR_A.sides[ 2 ] ), 1 ), TR_A.sides[ 1 ] );
+ var pointD = findIntersection( bisectAngle( TR_A.sides[ 0 ], reverseLine( TR_A.sides[ 2 ] ), 1 ), TR_A.sides[ 1 ] );
return pointD;
}()
</var>
@@ -49,16 +49,16 @@
<var id="AC">TR_C.niceSideLengths[ 2 ]</var>
</div>
<div class="problem">
- What is the length of the side AC?
+ What is the length of the side AC?
</div>
<div class="question">
<div class="graphie">
init({
range: TR_A.boundingRange(1.5)
})
- TR_B.draw();
+ TR_B.draw();
TR_B.drawLabels();
- TR_C.draw();
+ TR_C.draw();
TR_C.drawLabels();
</div>
</div>
@@ -74,16 +74,16 @@
<div id="AC">
<div class="vars">
<var id="AC">( TEMP_AB * TEMP_CD / TEMP_BD ).toFixed( 1 )</var>
- </div>
+ </div>
<div class="problem">
- What is the length of the side AC? (Round to 1 decimal place).
+ What is the length of the side AC? (Round to 1 decimal place).
</div>
<div class="solution"><var>AC</var></div>
<div class="hints" data-apply="appendContents">
<p><code>\dfrac{ <var>AB</var> }{ <var>BD</var> } = \dfrac{ AC }{ <var>CD</var> }</code></p>
- <p><code>AC = \dfrac{<var>AB</var> \cdot <var>CD</var> }{ <var>BD</var> }</code></p>
- <p><code>AC = <var>AC </var></code></p>
- </div>
+ <p><code>AC = \dfrac{<var>AB</var> \cdot <var>CD</var> }{ <var>BD</var> }</code></p>
+ <p><code>AC = <var>AC </var></code></p>
+ </div>
</div>
<div id="AB">
<div class="vars">
@@ -92,14 +92,14 @@
<var id="SIDES_C">[ [ 1,2 ], [ ] ]</var>
</div>
<div class="problem">
- What is the length of the side AB? (Round to 1 decimal place).
+ What is the length of the side AB? (Round to 1 decimal place).
</div>
<div class="solution"><var>AB</var></div>
<div class="hints" data-apply="appendContents">
<p><code>\dfrac{ AB }{ <var>BD</var> } = \dfrac{ <var>AC</var> }{ <var>CD</var> }</code></p>
- <p><code>AB = \dfrac{ <var>AC</var> \cdot <var>BD</var> }{ <var>CD</var> }</code></p>
- <p><code>AB = <var>AB </var></code></p>
- </div>
+ <p><code>AB = \dfrac{ <var>AC</var> \cdot <var>BD</var> }{ <var>CD</var> }</code></p>
+ <p><code>AB = <var>AB </var></code></p>
+ </div>
</div>
<div id="CD">
<div class="vars">
@@ -113,10 +113,10 @@
<div class="solution"><var>CD</var></div>
<div class="hints" data-apply="appendContents">
<p><code>\dfrac{ <var> AB</var> }{ <var>BD</var> } = \dfrac{ <var>AC</var> }{ CD }</code></p>
- <p><code>CD = \dfrac{ <var>AC</var> \cdot <var>BD</var> }{ <var>AB</var> }</code></p>
- <p><code>CD = <var>CD </var></code></p>
+ <p><code>CD = \dfrac{ <var>AC</var> \cdot <var>BD</var> }{ <var>AB</var> }</code></p>
+ <p><code>CD = <var>CD </var></code></p>
</div>
- </div>
+ </div>
<div id="BD">
<div class="vars">
<var id="BD">( TEMP_AB * TEMP_CD / TEMP_AC ).toFixed( 1 )</var>
@@ -129,10 +129,10 @@
<div class="solution"><var>BD</var></div>
<div class="hints" data-apply="appendContents">
<p><code>\dfrac{ <var> AB</var> }{ BD } = \dfrac{ <var>AC</var> }{ <var>CD</var> }</code></p>
- <p><code>BD = \dfrac{ <var>AB</var> \cdot <var>CD</var> }{ <var>AC</var> }</code></p>
- <p><code>BD = <var>BD</var></code></p>
+ <p><code>BD = \dfrac{ <var>AB</var> \cdot <var>CD</var> }{ <var>AC</var> }</code></p>
+ <p><code>BD = <var>BD</var></code></p>
</div>
- </div>
+ </div>
</div>
</div>
</body>
View
4 exercises/angle_types.html
@@ -38,10 +38,10 @@
scale: 20
});
path([ [5 * cos( ANGLE_ONE_R ), 5 * sin( ANGLE_ONE_R )], [0, 0], [5 * cos( ANGLE_TWO_R ), 5 * sin( ANGLE_TWO_R )] ]);
-
+
<!-- somewhat verbose, but draws a right angle symbol or arc based on angle -->
DIFF == 90 ? path([ [1 * cos( ANGLE_ONE_R ), 1 * sin( ANGLE_ONE_R )], [sqrt(2) * cos( ANGLE_ONE_R + PI / 4 ), sqrt(2) * sin( ANGLE_ONE_R + PI / 4)], [1 * cos( ANGLE_TWO_R ), 1 * sin( ANGLE_TWO_R )] ]) : arc( [0,0], 1, ANGLE_ONE, ANGLE_TWO );
-
+
graph.protractor = new Protractor( [22, 0], 8 );
Khan.scratchpad.disable();
</div>
View
246 exercises/angles_1.html
@@ -88,32 +88,32 @@
// Label the given angles
if( RAND3 == 0 ) {
- label( [0.5, 1.8], "\\color{green}{<var>ACCUTEANGLE</var>&deg;}",
+ label( [0.5, 1.8], "\\color{green}{<var>ACCUTEANGLE</var>&deg;}",
"above" );
arc( [0, 0], 1.2, 70, 90, { stroke: "green" } );
- ORIGINAL_LABEL = label( [-1.2, -0.75],
+ 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}{<var>90-ACCUTEANGLE</var>&deg;}",
+ label( [-1.2, -0.75], "\\color{green}{<var>90-ACCUTEANGLE</var>&deg;}",
"below left" );
arc( [0, 0], 1.2, 180, 248, { stroke: "green" } );
- ORIGINAL_LABEL = label( [0.5, 1.8],
+ 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}{<var>ACCUTEANGLE</var>&deg;}",
+ label( [0, -2], "\\color{green}{<var>ACCUTEANGLE</var>&deg;}",
"below left" );
arc( [0, 0], 1.2, 248, 270, { stroke: "green" } );
- ORIGINAL_LABEL = label( [1.5, 0],
+ ORIGINAL_LABEL = label( [1.5, 0],
"\\color{blue}{\\angle{BGE}} = {?}", "above right" );
arc( [0, 0], 1.2, 0, 70, { stroke: "blue" } );
}
</div>
- <p style="font-size:70%; color:grey"><strong>NOTE:</strong>
+ <p style="font-size:70%; color:grey"><strong>NOTE:</strong>
Angles not necessarily drawn to scale.</p>
</div>
@@ -124,10 +124,10 @@
<div class="hints">
<p data-if="RAND3 === 0">
- Because we know <code>\overline{AB} \perp \overline{CD}</code>, we know
+ Because we know <code>\overline{AB} \perp \overline{CD}</code>, we know
<code>\color{purple}{\angle{CGB}} = 90&deg;</code>
<span class="graphie" data-update="complementary-and-opposite">
- label( [2.2, 1.7], "\\color{purple}{90&deg;}",
+ label( [2.2, 1.7], "\\color{purple}{90&deg;}",
"above right" );
arc( [0, 0], 3, 0, 90, { stroke: "purple" } );
</span>
@@ -135,48 +135,48 @@
<p data-else-if="RAND3 === 1">
<code>\color{orange}{\angle{EGB}} = \color{green}{\angle{AGF}}
= <var>90 - ACCUTEANGLE</var>&deg;</code>,
- because they are opposite angles from each other. Opposite angles
+ because they are opposite angles from each other. Opposite angles
are congruent (equal).
<span class="graphie" data-update="complementary-and-opposite">
- label( [1.2, 0], "\\color{orange}{<var>90 - ACCUTEANGLE</var>&deg;}",
+ label( [1.2, 0], "\\color{orange}{<var>90 - ACCUTEANGLE</var>&deg;}",
"above right" );
arc( [0, 0], 1.2, 0, 68, { stroke: "orange" } );
</span>
</p>
<p data-else>
- Because we know <code>\overline{AB} \perp \overline{CD}</code>, we know
+ Because we know <code>\overline{AB} \perp \overline{CD}</code>, we know
<code>\color{purple}{\angle{AGD}} = 90&deg;</code>
<span class="graphie" data-update="complementary-and-opposite">
- label( [-2.2, -1.7], "\\color{purple}{90&deg;}",
+ label( [-2.2, -1.7], "\\color{purple}{90&deg;}",
"below left" );
arc( [0, 0], 3, 180, 270, { stroke: "purple" } );
</span>
</p>
<p data-if="RAND3===0">
- <code>\color{orange}{\angle{EGB}} = \color{purple}{90&deg;}
+ <code>\color{orange}{\angle{EGB}} = \color{purple}{90&deg;}
- \color{green}{\angle{CGE}} = <var>90 - ACCUTEANGLE</var>&deg;</code>
<span class="graphie" data-update="complementary-and-opposite">
- label( [1.2, 0], "\\color{orange}{<var>90 - ACCUTEANGLE</var>&deg;}",
+ label( [1.2, 0], "\\color{orange}{<var>90 - ACCUTEANGLE</var>&deg;}",
"above right" );
arc( [0, 0], 1.2, 0, 68, { stroke: "orange" } );
</span>
</p>
<p data-else-if="RAND3===1">
- Because we know <code>\overline{AB} \perp \overline{CD}</code>, we know
+ Because we know <code>\overline{AB} \perp \overline{CD}</code>, we know
<code>\color{purple}{\angle{CGB}} = 90&deg;</code>
<span class="graphie" data-update="complementary-and-opposite">
- label( [2.2, 1.7], "\\color{purple}{90&deg;}",
+ label( [2.2, 1.7], "\\color{purple}{90&deg;}",
"above right" );
arc( [0, 0], 3, 0, 90, { stroke: "purple" } );
</span>
</p>
<p data-else>
- <code>\color{orange}{\angle{AGF}} =
- \color{purple}{90&deg;} - \color{green}{\angle{DGF}} =
+ <code>\color{orange}{\angle{AGF}} =
+ \color{purple}{90&deg;} - \color{green}{\angle{DGF}} =
<var>90 - ACCUTEANGLE</var>&deg;</code>
<span class="graphie" data-update="complementary-and-opposite">
- label( [-1.2, 0], "\\color{orange}{<var>90 - ACCUTEANGLE</var>&deg;}",
+ label( [-1.2, 0], "\\color{orange}{<var>90 - ACCUTEANGLE</var>&deg;}",
"below left" );
arc( [0, 0], 1.2, 180, 248, { stroke: "orange" } );
</span>
@@ -184,37 +184,37 @@
<p data-if="RAND3===0">
<code>\color{blue}{\angle{AGF}} = \color{orange}{\angle{EGB}} =
- <var>90 - ACCUTEANGLE</var>&deg;</code>,
- because they are opposite from each other. Opposite angles are
+ <var>90 - ACCUTEANGLE</var>&deg;</code>,
+ because they are opposite from each other. Opposite angles are
congruent (equal).
<span class="graphie" data-update="complementary-and-opposite">
ORIGINAL_LABEL.remove();
- label( [-1.2, -0.75],
- "\\color{blue}{\\angle{AGF}}=<var>90 - ACCUTEANGLE</var>&deg;",
+ label( [-1.2, -0.75],
+ "\\color{blue}{\\angle{AGF}}=<var>90 - ACCUTEANGLE</var>&deg;",
"below left" );
</span>
</p>
<p data-else-if="RAND3===1">
- <code>\color{blue}{\angle{CGE}} =
- \color{purple}{90&deg;} - \color{orange}{\angle{EGB}} =
+ <code>\color{blue}{\angle{CGE}} =
+ \color{purple}{90&deg;} - \color{orange}{\angle{EGB}} =
<var>ACCUTEANGLE</var>&deg;
</code>
<span class="graphie" data-update="complementary-and-opposite">
ORIGINAL_LABEL.remove();
- label( [0.5, 1.8],
- "\\color{blue}{\\angle{CGE}} = <var>ACCUTEANGLE</var>&deg;",
+ label( [0.5, 1.8],
+ "\\color{blue}{\\angle{CGE}} = <var>ACCUTEANGLE</var>&deg;",
"above" )
</span>
</p>
<p data-else>
- <code>\color{blue}{\angle{BGE}} = \color{orange}{\angle{AGF}} =
- <var>90 - ACCUTEANGLE</var>&deg;</code>,
- because they are opposite from each other. Opposite angles are
+ <code>\color{blue}{\angle{BGE}} = \color{orange}{\angle{AGF}} =
+ <var>90 - ACCUTEANGLE</var>&deg;</code>,
+ because they are opposite from each other. Opposite angles are
congruent (equal).
<span class="graphie" data-update="complementary-and-opposite">
ORIGINAL_LABEL.remove();
- label( [1.5, 0],
- "\\color{blue}{\\angle{BGE}} = <var>90 - ACCUTEANGLE</var>&deg;",
+ label( [1.5, 0],
+ "\\color{blue}{\\angle{BGE}} = <var>90 - ACCUTEANGLE</var>&deg;",
"above right" );
</span>
</p>
@@ -270,36 +270,36 @@
label( [0, 3], "B", "above" );
label( [4, -2], "C", "below right" );
label( [-8, -2], "D", "below" );
-
+
// Label the angles acording to variation
if( RAND2 == 0 ) {
- label( [3, -2], "\\color{green}{<var>Tri_Y</var>&deg;}",
+ label( [3, -2], "\\color{green}{<var>Tri_Y</var>&deg;}",
"above left" );
arc( [4, -2], 1.2, 130, 180, { stroke: "green" } );
- label( [0, 1.5], "\\color{purple}{<var>Tri_Z</var>&deg;}",
+ label( [0, 1.5], "\\color{purple}{<var>Tri_Z</var>&deg;}",
"below" );
arc( [0, 3], 1.5, 230, 310, { stroke: "purple" } );
- ORIGINAL_LABEL = label( [-4.7, -2], "\\color{blue}{\\angle{DAB}}= {?}",
+ 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}{<var>180 - Tri_X</var>&deg;}",
+ label( [-4.7, -2], "\\color{green}{<var>180 - Tri_X</var>&deg;}",
"above left" );
arc( [-4, -2], .75, 50, 180, { stroke: "green" } );
- label( [0, 1.5], "\\color{purple}{<var>Tri_Z</var>&deg;}",
+ label( [0, 1.5], "\\color{purple}{<var>Tri_Z</var>&deg;}",
"below" );
arc( [0, 3], 1.5, 230, 310, { stroke: "purple" } );
- ORIGINAL_LABEL = label( [2.80, -2], "\\color{blue}{\\angle{ACB}} = {?}",
+ ORIGINAL_LABEL = label( [2.80, -2], "\\color{blue}{\\angle{ACB}} = {?}",
"above left" );
arc( [4, -2], 1.2, 130, 180, { stroke: "blue" } );
}
</div>
- <p style="font-size:70%; color:grey"><strong>NOTE:</strong>
+ <p style="font-size:70%; color:grey"><strong>NOTE:</strong>
Angles not necessarily drawn to scale.</p>
</div>
@@ -307,12 +307,12 @@
<var data-if="RAND2 === 0">Tri_Y + Tri_Z</var>
<var data-else>Tri_Y</var>
</div>
-
+
<div class="hints">
<p data-if="RAND2 === 0">
<code>
- \color{orange}{\angle{BAC}} =
- 180&deg; - \color{purple}{\angle{ABC}} - \color{green}{\angle{ACB}} =
+ \color{orange}{\angle{BAC}} =
+ 180&deg; - \color{purple}{\angle{ABC}} - \color{green}{\angle{ACB}} =
<var>180 - Tri_Y - Tri_Z</var>&deg;
</code>,
This is because angles inside a triangle add up to 180 degrees.
@@ -324,11 +324,11 @@
</p>
<p data-else>
<code>
- \color{orange}{\angle{BAC}} =
- 180&deg; - \color{green}{\angle{DAB}} =
+ \color{orange}{\angle{BAC}} =
+ 180&deg; - \color{green}{\angle{DAB}} =
<var>180 - Tri_Y - Tri_X</var>&deg;
</code>,
- because supplementary angles along a line add up to
+ because supplementary angles along a line add up to
180 degrees.
<span class="graphie" data-update="supplementary-and-triangle">
label( [-3.3, -2], "\\color{orange}{<var>Tri_X</var>&deg;}",
@@ -336,33 +336,33 @@
arc( [-4, -2], 0.75, 0, 49, {stroke: "orange"} );
</span>
</p>
-
+
<p data-if="RAND2 === 0">
<code>
- \color{blue}{\angle{DAB}} =
- 180&deg; - \color{orange}{\angle{BAC}} =
+ \color{blue}{\angle{DAB}} =
+ 180&deg; - \color{orange}{\angle{BAC}} =
<var>Tri_Y + Tri_Z</var>&deg;
- </code>,
+ </code>,
because supplementary angles along a line add up to 180&deg;
<span class="graphie" data-update="supplementary-and-triangle">
ORIGINAL_LABEL.remove();
- label( [-4.7, -2],
- "\\color{blue}{\\angle{DAB}} = <var>Tri_Y + Tri_Z</var>&deg;",
+ label( [-4.7, -2],
+ "\\color{blue}{\\angle{DAB}} = <var>Tri_Y + Tri_Z</var>&deg;",
"above left" );
</span>
</p>
<p data-else>
<code>
- \color{blue}{\angle{ACB}} =
- 180&deg; - \color{orange}{\angle{BAC}} - \color{purple}{\angle{ABC}} =
+ \color{blue}{\angle{ACB}} =
+ 180&deg; - \color{orange}{\angle{BAC}} - \color{purple}{\angle{ABC}} =
<var>Tri_Y</var>&deg;
</code>,
because angles inside a triangle add up to 180&deg;.
<span class="graphie" data-update="supplementary-and-triangle">
ORIGINAL_LABEL.remove();
- label( [2.80, -2],
- "\\color{blue}{\\angle{ACB}} = <var>Tri_Y</var>&deg;",
+ label( [2.80, -2],
+ "\\color{blue}{\\angle{ACB}} = <var>Tri_Y</var>&deg;",
"above left" );
</span>
</p>
@@ -442,29 +442,29 @@
//draw given angles
if( RAND3 == 0 ) {
- ORIGINAL_LABEL = label( [0, -2.50],
+ ORIGINAL_LABEL = label( [0, -2.50],
"\\color{blue}{\\angle{AIH}} = {?}", "left" );
arc( [1.25, -3], .75, 135, 190, {stroke: "blue"} );
label( [-4.2, 4.25], "\\color{green}{<var>Tri_Z</var>&deg;}", "below" );
arc( [-4.47, 5.25], 1, 255, 330, {stroke: "green"} );
- label( [-5.5, -3.5], "\\color{purple}{<var>Tri_X</var>&deg;}",
+ label( [-5.5, -3.5], "\\color{purple}{<var>Tri_X</var>&deg;}",
"above right" );
arc( [-6, -4], 1, 10, 80, {stroke: "purple"} );
} else if( RAND3 == 1 ) {
- ORIGINAL_LABEL = label( [3.5, -2.6],
+ 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}{<var>Tri_Z</var>&deg;}", "below" );
arc( [-5.07, 1.75], 1, 257, 326, {stroke: "green"} );
- label( [-5.5, -3.5], "\\color{purple}{<var>Tri_X</var>&deg;}",
+ label( [-5.5, -3.5], "\\color{purple}{<var>Tri_X</var>&deg;}",
"above right" );
arc( [-6, -4], 1, 10, 80, {stroke: "purple"} );
} else {
- ORIGINAL_LABEL = label( [-5.5, -3.5],
+ ORIGINAL_LABEL = label( [-5.5, -3.5],
"\\color{blue}{\\angle{BAC}} = {?}", "above right" );
arc( [-6, -4], 1, 10, 80, {stroke: "blue"} );
@@ -476,7 +476,7 @@
}
</div>
- <p style="font-size:70%; color:grey"><strong>NOTE:</strong>
+ <p style="font-size:70%; color:grey"><strong>NOTE:</strong>
Angles not necessarily drawn to scale.</p>
</div>
@@ -487,21 +487,21 @@
<div class="hints">
<p data-if="RAND3 === 0">
- <code>\color{orange}{\angle{AHI}} = \color{green}{\angle{AJK}}</code>,
- because they are corresponding angles formed by 2 parallel lines and
+ <code>\color{orange}{\angle{AHI}} = \color{green}{\angle{AJK}}</code>,
+ because they are corresponding angles formed by 2 parallel lines and
a transversal line. Corresponding angles are congruent (equal).
<span class="graphie" data-update="parallel-and-triangle">
- label( [-4.60, 0.75], "\\color{orange}{<var>Tri_Z</var>&deg;}",
+ label( [-4.60, 0.75], "\\color{orange}{<var>Tri_Z</var>&deg;}",
"below" );
arc( [-5.07, 1.75], 1, 260, 325, {stroke: "orange"} );
</span>
</p>
<p data-else>
- <code>\color{orange}{\angle{AJK}} = \color{green}{\angle{AHI}}</code>,
- because they are corresponding angles formed by 2 parallel lines and
+ <code>\color{orange}{\angle{AJK}} = \color{green}{\angle{AHI}}</code>,
+ because they are corresponding angles formed by 2 parallel lines and
a transversal line. Corresponding angles are congruent (equal).
<span class="graphie" data-update="parallel-and-triangle">
- label( [-4.00, 4.25], "\\color{orange}{<var>Tri_Z</var>&deg;}",
+ label( [-4.00, 4.25], "\\color{orange}{<var>Tri_Z</var>&deg;}",
"below" );
arc( [-4.47, 5.25], 1, 257, 325, {stroke: "orange"} );
</span>
@@ -510,43 +510,43 @@
<p data-if="RAND3 === 0">
<code>
- \color{blue}{\angle{AIH}} =
- 180&deg; - \color{orange}{\angle{AHI}} - \color{purple}{\angle{BAC}} =
- <var>180 - Tri_X - Tri_Z</var>&deg;
+ \color{blue}{\angle{AIH}} =
+ 180&deg; - \color{orange}{\angle{AHI}} - \color{purple}{\angle{BAC}} =
+ <var>180 - Tri_X - Tri_Z</var>&deg;
</code>,
- because the 3 angles are contained in <code>\triangle{AHI}</code>.
+ because the 3 angles are contained in <code>\triangle{AHI}</code>.
Angles inside a triangle add up to 180&deg;.
<span class="graphie" data-update="parallel-and-triangle">
ORIGINAL_LABEL.remove();
- label( [0, -2.50],
- "\\color{blue}{\\angle{AIH}} = <var>180 - Tri_X - Tri_Z</var>&deg;",
- "left" );
+ label( [0, -2.50],
+ "\\color{blue}{\\angle{AIH}} = <var>180 - Tri_X - Tri_Z</var>&deg;",
+ "left" );
</span>
</p>
<p data-else>
<span class="graphie" data-update="parallel-and-triangle">
- ORIGINAL_LABEL.remove();
+ ORIGINAL_LABEL.remove();
if ( RAND3 === 1 ) {
- label( [3.3, -2.6],
- "\\color{blue}{\\angle{AKJ}} = <var>Tri_Y</var>&deg;",
+ label( [3.3, -2.6],
+ "\\color{blue}{\\angle{AKJ}} = <var>Tri_Y</var>&deg;",
"above" );
} else {
- label( [-5.5, -3.5],
- "\\color{blue}{\\angle{BAC}} = <var>Tri_X</var>&deg;",
+ label( [-5.5, -3.5],
+ "\\color{blue}{\\angle{BAC}} = <var>Tri_X</var>&deg;",
"above right" );
}
</span>
<code data-if="RAND3 === 1">
- \color{blue}{\angle{AKJ}} =
- 180&deg; - \color{orange}{\angle{AJK}} - \color{purple}{\angle{BAC}} =
- <var>Tri_Y</var>&deg;
+ \color{blue}{\angle{AKJ}} =
+ 180&deg; - \color{orange}{\angle{AJK}} - \color{purple}{\angle{BAC}} =
+ <var>Tri_Y</var>&deg;
</code>
<code data-else>
- \color{blue}{\angle{BAC}} =
- 180&deg; - \color{orange}{\angle{AJK}} - \color{purple}{\angle{AKJ}} =
+ \color{blue}{\angle{BAC}} =
+ 180&deg; - \color{orange}{\angle{AJK}} - \color{purple}{\angle{AKJ}} =
<var>Tri_X</var>&deg;
- </code>,
- because the 3 angles are contained in <code>\triangle{AJK}</code>.
+ </code>,
+ because the 3 angles are contained in <code>\triangle{AJK}</code>.
Angles inside a triangle add up to 180&deg;.
</p>
</div>
@@ -574,7 +574,7 @@
<span data-else><code>\color{blue}{\angle{GCJ}} = {?}</code></span>
</div>
- <div class="graphie" id="alternate-exterior-and-complementary">
+ <div class="graphie" id="alternate-exterior-and-complementary">
init( {
range: [[-6, 8], [-5, 5]],
scale: [50, 50]
@@ -613,23 +613,23 @@
// Label given angles
if( RAND2 == 0 ) {
- ORIGINAL_LABEL = label( [0, 3.5],
+ ORIGINAL_LABEL = label( [0, 3.5],
"\\color{blue}{\\angle{IAK}} = {?}", "above left" );
arc( [0, 2], 1, 90, 135, {stroke:"blue"} );
- label( [4.75, -2], "\\color{green}{<var>Tri_Y</var>&deg;}",
+ label( [4.75, -2], "\\color{green}{<var>Tri_Y</var>&deg;}",
"below right" );
arc( [4, -2], .75, 315, 360, {stroke: "green"} );
} else {
label( [0, 3], "\\color{green}{<var>Tri_Y</var>&deg;}", "above left" );
arc( [0, 2], 1, 90, 135, {stroke:"green"} );
- ORIGINAL_LABEL = label( [4.75, -2],
+ ORIGINAL_LABEL = label( [4.75, -2],
"\\color{blue}{\\angle{GCJ} = {?}}", "below right" );
arc( [4, -2], .75, 315, 360, {stroke: "blue"} )
}
</div>
- <p style="font-size:70%; color:grey"><strong>NOTE:</strong>
+ <p style="font-size:70%; color:grey"><strong>NOTE:</strong>
Angles not necessarily drawn to scale.</p>
</div>
@@ -638,30 +638,30 @@
<div class="hints">
<p data-if="RAND2 === 0">
- <code>\color{orange}{\angle{DAI}} = \color{green}{\angle{GCJ}} =
- <var>Tri_Y</var>&deg;</code>,
- because they are alternate exterior angles, formed by 2 parallel lines
+ <code>\color{orange}{\angle{DAI}} = \color{green}{\angle{GCJ}} =
+ <var>Tri_Y</var>&deg;</code>,
+ because they are alternate exterior angles, formed by 2 parallel lines
and a transversal line, they are congruent (equal).
<span class="graphie" data-update="alternate-exterior-and-complementary">
- label( [-.80, 2], "\\color{orange}{<var>Tri_Y</var>&deg;}",
+ label( [-.80, 2], "\\color{orange}{<var>Tri_Y</var>&deg;}",
"above left" );
arc( [0, 2], 1, 135, 180, {stroke: "orange"} );
</span>
Alternatively, you can pair up using opposite angles and alternate interior
- angles to achieve the same result (as seen using
+ angles to achieve the same result (as seen using
<code>\color{pink}{pink}</code>).
<span class="graphie" data-update="alternate-exterior-and-complementary">
- label( [1, 2], "\\color{pink}{<var>Tri_Y</var>&deg;}",
+ label( [1, 2], "\\color{pink}{<var>Tri_Y</var>&deg;}",
"below right" );
arc( [0, 2], 1, 315, 360, {stroke: "pink"} );
- label( [3, -2], "\\color{pink}{<var>Tri_Y</var>&deg;}",
+ label( [3, -2], "\\color{pink}{<var>Tri_Y</var>&deg;}",
"above left" );
arc( [4, -2], 1, 135, 180, {stroke: "pink"} );
</span>
</p>
<p>
- <code>\color{purple}{\angle{DAK}} = 90&deg;</code>,
+ <code>\color{purple}{\angle{DAK}} = 90&deg;</code>,
because angles formed by perpendicular lines are equal to 90&deg;.
<span class="graphie" data-update="alternate-exterior-and-complementary">
label( [-1.68, 2], "\\color{purple}{90&deg;}", "above left" );
@@ -670,52 +670,52 @@
</p>
<p data-if="RAND2 === 0">
- <code>\color{blue}{\angle{IAK}} = 90&deg; - \color{orange}{\angle{DAI}} =
- <var>90 - Tri_Y</var>&deg;</code>,
- because angles <code>\color{blue}{\angle{IAK}}</code>
- and <code>\color{orange}{\angle{DAI}}</code> make up angle
+ <code>\color{blue}{\angle{IAK}} = 90&deg; - \color{orange}{\angle{DAI}} =
+ <var>90 - Tri_Y</var>&deg;</code>,
+ because angles <code>\color{blue}{\angle{IAK}}</code>
+ and <code>\color{orange}{\angle{DAI}}</code> make up angle
<code>\color{purple}{\angle{DAK}}</code>.
<span class="graphie" data-update="alternate-exterior-and-complementary">
ORIGINAL_LABEL.remove();
- label( [0, 3.5],
- "\\color{blue}{\\angle{IAK}} = <var>90 - Tri_Y</var>&deg;",
- "above left" );
+ label( [0, 3.5],
+ "\\color{blue}{\\angle{IAK}} = <var>90 - Tri_Y</var>&deg;",
+ "above left" );
</span>
</p>
<p data-if="RAND2 !== 0">
- <code>\color{orange}{\angle{IAK}} = 90&deg; - \color{green}{\angle{IAK}} =
- <var>90 - Tri_Y</var>&deg;</code>,
- because angles <code>\color{green}{\angle{IAK}}</code>
- and <code>\color{orange}{\angle{DAI}}</code>, make up angle
+ <code>\color{orange}{\angle{IAK}} = 90&deg; - \color{green}{\angle{IAK}} =
+ <var>90 - Tri_Y</var>&deg;</code>,
+ because angles <code>\color{green}{\angle{IAK}}</code>
+ and <code>\color{orange}{\angle{DAI}}</code>, make up angle
<code>\color{purple}{\angle{DAK}}</code>.
<span class="graphie" data-update="alternate-exterior-and-complementary">
- label( [-.80, 2], "\\color{orange}{<var>90-Tri_Y</var>&deg;}",
+ label( [-.80, 2], "\\color{orange}{<var>90-Tri_Y</var>&deg;}",
"above left" );
arc( [0, 2], 1, 135, 180, {stroke: "orange"} );
- </span>
+ </span>
</p>
<p data-if="RAND2 !== 0">
- <code>\color{blue}{\angle{GCJ}} = \color{orange}{\angle{DAI}} =
- <var>90 - Tri_Y</var>&deg;</code>,
- because they are alternate exterior angles formed by 2 parallel lines
+ <code>\color{blue}{\angle{GCJ}} = \color{orange}{\angle{DAI}} =
+ <var>90 - Tri_Y</var>&deg;</code>,
+ because they are alternate exterior angles formed by 2 parallel lines
and a transversal line, they are congruent (equal).
Alternatively, you can pair up using opposite angles and alternate interior
- angles to achieve the same result (as seen using
+ angles to achieve the same result (as seen using
<code>\color{pink}{pink}</code>).
<span class="graphie" data-update="alternate-exterior-and-complementary">
- label( [1, 2], "\\color{pink}{<var>90-Tri_Y</var>&deg;}",
+ label( [1, 2], "\\color{pink}{<var>90-Tri_Y</var>&deg;}",
"below right" );
arc( [0, 2], 1, 315, 360, {stroke: "pink"} );
- label( [3, -2], "\\color{pink}{<var>90-Tri_Y</var>&deg;}",
+ label( [3, -2], "\\color{pink}{<var>90-Tri_Y</var>&deg;}",
"above left" );
arc( [4, -2], 1, 135, 180, {stroke: "pink"} );
-
+
ORIGINAL_LABEL.remove();
- label( [4.75, -2],
- "\\color{blue}{\\angle{GCJ} = <var>90-Tri_Y</var>&deg;}",
+ label( [4.75, -2],
+ "\\color{blue}{\\angle{GCJ} = <var>90-Tri_Y</var>&deg;}",
"below right" );
</span>
</p>
View
2  exercises/angles_of_a_polygon.html
@@ -73,7 +73,7 @@
<div class="solution" data-type="multiple">
<span class="sol"><var>360</var></span> degrees
</div>
-
+
<div class="hints">
<div>
<p>The exterior angles are shown above.</p>
View
6 exercises/arithmetic_word_problems_2.html
@@ -24,7 +24,7 @@
How much does the <var>color(2)</var> <var>clothing(2)</var> cost?
</p>
<div class="solution" data-forms="dollar"><var>TOTAL</var></div>
-
+
<div class="hints">
<p>
The cost of the <var>color(2)</var> <var>clothing(2)</var>
@@ -67,7 +67,7 @@
<p><var>An( color( 2 ) )</var> <var>clothing( 2 )</var> costs <code>$<var>NUM1</var></code>.
</div>
</div>
-
+
<div id="compare-number">
<p class="problem">
<var>An( color(1) )</var> <var>clothing(1)</var> costs $<var>TOTAL</var>,
@@ -155,7 +155,7 @@
<div id="groups-number">
<p class="problem">
- <var>person(1)</var> has <var>biked(1)</var> <var>his(1)</var> <var>bike(1)</var> for a total of <var>plural( TOTAL, distance(1) )</var>
+ <var>person(1)</var> has <var>biked(1)</var> <var>his(1)</var> <var>bike(1)</var> for a total of <var>plural( TOTAL, distance(1) )</var>
since <var>he(1)</var> started <var>biking(1)</var> daily. <var>He(1)</var> has been <var>biking(1)</var> <var>plural( NUM2, distance(1) )</var> each day.
</p>
<p class="question">
View
4 exercises/changing_decimals_to_percents.html
@@ -16,7 +16,7 @@
<p class="question">Express <code><var>DECIMAL</var></code> as a percent.</p>
<div class="solution" data-type="multiple">
<p><span class="sol"><var>SOLN</var></span> %</p>
- </div>
+ </div>
<div class="hints">
<p>To convert a decimal to a fraction, we need to multiply by 100 and add the <code>\%</code> symbol.</p>
@@ -28,4 +28,4 @@
</div>
</div>
</body>
-</html>
+</html>
View
4 exercises/changing_fractions_to_decimals_1.html
@@ -3,7 +3,7 @@
<head>
<title>Changing fractions to decimals 1</title>
<script src="../khan-exercise.js"></script>
-
+
<script type="text/javascript">
function decimalLength( n ) {
return ( ( n + "" ).split( "." )[1] || "" ).length;
@@ -32,7 +32,7 @@
<div class="solution" data-type="decimal"><var>DEC</var></div>
</div>
</div>
-
+
<div class="hints">
<p data-if="GCD > 1"><code><var>fraction( _N, _D )</var></code> reduces to <code><var>fraction( N, D )</var></code>.</p>
<p data-if="D === 10 || D === 100">Denominators of 10 or 100 are easy cases: The decimal form is just the numerator with the decimal place moved left by the number of 0s in the denominator.
View
2  exercises/changing_percents_to_decimals.html
@@ -27,4 +27,4 @@
</div>
</div>
</body>
-</html>
+</html>
View
4 exercises/changing_percents_to_fractions.html
@@ -14,7 +14,7 @@
<var id="A">randRangeExclude( 1 , 299 , [ 100 ] )</var>
</div>
<p class="question">Express <code><var>A</var>\%</code> as a fraction. Reduce to lowest terms.</p>
- <p class="solution" data-type="rational"><var>A / 100</var></p>
+ <p class="solution" data-type="rational"><var>A / 100</var></p>
<div class="hints">
<p><code><var>A</var>\%</code> literally means <code><var>A</var></code> per 100</p>
<p>Putting this in fraction form: <code><var>fraction( A , 100 )</var></code></p>
@@ -41,4 +41,4 @@
</div>
</div>
</body>
-</html>
+</html>
View
34 exercises/circles_1.html
@@ -9,42 +9,42 @@
var D_COLOR = "green";
var C_COLOR = "blue";
var K_COLOR = "red";
-
+
function initCircle( R ) {
var graph = KhanUtil.currentGraph;
-
+
graph.init({
range: [ [-1.1, 1.1], [-1.1, 1.1] ],
scale: 100
});
-
+
graph.circle( [0, 0], 1, { "fill-opacity": 0 } );
}
function drawRadius( R ) {
var graph = KhanUtil.currentGraph;
-
+
graph.line( [0, 0], [1, 0], { "fill": "none", "stroke": R_COLOR } );
graph.label( [1/2, 0], "\\color{" + R_COLOR + "}{r = " + R + "}", "below" );
}
function drawDiameter( R ) {
var graph = KhanUtil.currentGraph;
-
+
graph.line( [-1, 0], [1, 0], { "stroke": D_COLOR } );
graph.label( [0, 0], "\\color{" + D_COLOR + "}{d = " + 2 * R + "}", "above" );
}
function drawCircumference( R ) {
var graph = KhanUtil.currentGraph;
-
+
graph.circle( [0, 0], 1, { "stroke": C_COLOR } );
graph.label( [0, -1], "\\color{" + C_COLOR + "}{c = " + 2 * R + "\\pi}", "below" );
}
function drawArea( R ) {
var graph = KhanUtil.currentGraph;
-
+
var c = graph.circle( [0, 0], 1, { "fill": "#ffcccc", "stroke-width": 0 } );
jQuery(c.node).insertBefore(jQuery(graph.raphael.canvas).find("ellipse")[0]);
@@ -69,7 +69,7 @@
<div class="hints">
<div class="graphie" id="circle">
initCircle( R );
-
+
drawRadius( R );
</div>
<div>
@@ -123,7 +123,7 @@
<div class="hints">
<div class="graphie" id="circle">
initCircle( R );
-
+
drawRadius( R );
</div>
<div>
@@ -177,7 +177,7 @@
<div class="hints">
<div class="graphie" id="circle">
initCircle( R );
-
+
drawDiameter( R );
</div>
<div>
@@ -231,7 +231,7 @@
<div class="hints">
<div class="graphie" id="circle">
initCircle( R );
-
+
drawRadius( R );
</div>
<div>
@@ -258,7 +258,7 @@
<div class="hints">
<div class="graphie" id="circle">
initCircle( R );
-
+
drawArea( R );
</div>
<div>
@@ -285,13 +285,13 @@
<div class="hints">
<div class="graphie" id="circle">
initCircle( R );
-
+
drawDiameter( R );
</div>
<p>First, find the radius: <code>r = d/2 = \color{<var>D_COLOR</var>}{<var>2 * R</var>}/2 = \color{<var>R_COLOR</var>}{<var>R</var>}</code>.</p>
<div>
<p>Now find the area: <code>K = \pi r^2</code>, so <code>K = \pi \cdot \color{<var>R_COLOR</var>}{<var>R</var>}^2 = \color{<var>K_COLOR</var>}{<var>R * R</var>\pi}</code>.</p>
-
+
<div class="graphie" data-update="circle">
drawArea( R );
</div>
@@ -313,13 +313,13 @@
<div class="hints">
<div class="graphie" id="circle">
initCircle( R );
-
+
drawArea( R );
</div>
<p>First, find the radius: <code>K = \pi r^2</code>, so <code>r = \sqrt{K / \pi} = \sqrt{\color{<var>K_COLOR</var>}{<var>R * R</var>\pi} / \pi} = \color{<var>R_COLOR</var>}{<var>R</var>}</code>.</p>
<div>
<p>Now find the diameter: <code>d = 2r = 2\cdot \color{<var>R_COLOR</var>}{<var>R</var>} = \color{<var>D_COLOR</var>}{<var>2*R</var>}</code>.</p>
-
+
<div class="graphie" data-update="circle">
drawDiameter( R );
</div>
@@ -369,7 +369,7 @@
<div class="hints">
<div class="graphie" id="circle">
initCircle( R );
-
+
drawArea( R );
</div>
<p>First, find the radius: <code>K = \pi r^2</code>, so <code>r = \sqrt{K / \pi} = \sqrt{\color{<var>K_COLOR</var>}{<var>R * R</var>\pi} / \pi} = \color{<var>R_COLOR</var>}{<var>R</var>}</code>.</p>
View
6 exercises/circumradius.html
@@ -27,8 +27,8 @@
init({
range: [ [-1, 12 ], [ -7, 2.5 ] ]
})
- var trA = new Triangle( [ 3, -4 ], [ 60, 60, 60 ] , 16 , {} );
- var pointD = findIntersection( bisectAngle( trA.sides[ 0 ], reverseLine( trA.sides[ 2 ] ), 1 ), trA.sides[ 1 ] );
+ var trA = new Triangle( [ 3, -4 ], [ 60, 60, 60 ] , 16 , {} );
+ var pointD = findIntersection( bisectAngle( trA.sides[ 0 ], reverseLine( trA.sides[ 2 ] ), 1 ), trA.sides[ 1 ] );
trA.draw()
trA.labels = { "sides" : trA.niceSideLengths, "points": [ "A", "B", "C" ] };
trA.drawLabels();
@@ -43,7 +43,7 @@
<div class="hints">
<p>Because side <code>DAB</code> and <code>DAC</code> are equal.</p>
<p>ThatAngles <code>DAB</code> and <code>DAC</code> are equal.</p>
- </div>
+ </div>
</div>
</div>
</div>
View
4 exercises/comparing_absolute_values.html
@@ -4,10 +4,10 @@
<meta charset="UTF-8" />
<title>Comparing absolute values</title>
<script src="../khan-exercise.js"></script>
- <script type="text/javascript">
+ <script type="text/javascript">
function drawNumberLine( NUM ) {
var graph = KhanUtil.currentGraph;
-
+
graph.init({
range: [ [-1, 11], [-1, 1] ],
});
View
2  exercises/complementary_angles.html
@@ -31,7 +31,7 @@
range: [ [-2, 7], [-2, 6] ],
scale: 40
});
-
+
var DISP_ANGLE = Math.min( Math.max( 10, ANGLE ), 80 );
if ( ANGLE_ONE !== ANGLE_BOT ) {
DISP_ANGLE = 90 - DISP_ANGLE;
View
2  exercises/completing_the_square_1.html
@@ -78,4 +78,4 @@
</div>
</div>
</body>
-</html>
+</html>
View
2  exercises/completing_the_square_2.html
@@ -91,4 +91,4 @@
</div>
</div>
</body>
-</html>
+</html>
View
24 exercises/compound_inequalities.html
@@ -22,25 +22,25 @@
<body>
<div class="exercise">
<div class="vars" data-ensure="abs( SOLUTION[0] - SOLUTION[1] ) <= 5 && FAKE_ANSWER[0] !== SOLUTION[0] && FAKE_ANSWER[1] !== SOLUTION[1]">
- <var id="COEF">tabulate( function() {
+ <var id="COEF">tabulate( function() {
return randRange( 2, 9 ) * ( rand( 3 ) > 0 ? 1 : -1 );
} , 2 )</var>
- <var id="ONE_OVER_COEF">tabulate( function(i) {
- return fraction( 1, COEF[i] );
+ <var id="ONE_OVER_COEF">tabulate( function(i) {
+ return fraction( 1, COEF[i] );
}, 2 )</var>
<var id="SIGN">randFromArray( [ "-", "+" ], 2)</var>
- <var id="LEFT_INT">tabulate( function() {
+ <var id="LEFT_INT">tabulate( function() {
return rand( 3 ) > 0 ? randRange( 2, 9 ) : 0;
}, 2 )</var>
- <var id="ADD_TO_SIMPLIFY">tabulate( function(i) {
+ <var id="ADD_TO_SIMPLIFY">tabulate( function(i) {
return LEFT_INT[i] * ( SIGN[i] === "+" ? -1 : 1 );
}, 2 )</var>
<var id="COMP">randFromArray( [ "&lt;", "&gt;", "&le;", "&ge;" ], 2 )</var>
- <var id="RIGHT_INT">tabulate( function(i) {
+ <var id="RIGHT_INT">tabulate( function(i) {
return randRange( 1, 6 ) * abs( COEF[i] ) + ( SIGN[i] === "+" ? 1 : -1 ) * LEFT_INT[i];
}, 2 )</var>
<var id="VARIABLE_NAME">randFromArray([ "a", "b", "c", "x", "y", "z" ])</var>
- <var id="COMP_SOLUTION">tabulate( function(i) {
+ <var id="COMP_SOLUTION">tabulate( function(i) {
return getComp( COEF[i], COMP[i] );
}, 2 )</var>
<var id="SOLUTION_NOT_REDUCED">tabulate( function(i) {
@@ -133,8 +133,8 @@
</div>
</div>
<div class="graphie">
- var start = min( SOLUTION[0], SOLUTION[1] ) - randRange( 2, 5 );
- var end = max( SOLUTION[0], SOLUTION[1] ) + randRange( 2, 5 );
+ var start = min( SOLUTION[0], SOLUTION[1] ) - randRange( 2, 5 );
+ var end = max( SOLUTION[0], SOLUTION[1] ) + randRange( 2, 5 );
init({
range: [ [ start - 1, end + 1 ], [ -1, 1 ] ]
@@ -161,8 +161,8 @@
<div data-else>
<p>Therefore, since the graphs of the equalities do not intersect, the solution is:</p>
<p>
- <code>\color{<var>COLOR[0]</var>}{<var>VARIABLE_NAME + COMP_SOLUTION[0] + SOLUTION[0]</var>}</code> or
- <code>\color{<var>COLOR[1]</var>}{<var>VARIABLE_NAME + COMP_SOLUTION[1] + SOLUTION[1]</var>}</code>
+ <code>\color{<var>COLOR[0]</var>}{<var>VARIABLE_NAME + COMP_SOLUTION[0] + SOLUTION[0]</var>}</code> or
+ <code>\color{<var>COLOR[1]</var>}{<var>VARIABLE_NAME + COMP_SOLUTION[1] + SOLUTION[1]</var>}</code>
</p>
</div>
</div>
@@ -181,7 +181,7 @@
<p>Therefore, the solution is:</p>
<p>
<code>\color{<var>COLOR[0]</var>}{<var>VARIABLE_NAME + COMP_SOLUTION[0] + SOLUTION[0]</var>}</code> and
- <code>\color{<var>COLOR[1]</var>}{<var>VARIABLE_NAME + COMP_SOLUTION[1] + SOLUTION[1]</var>}</code>
+ <code>\color{<var>COLOR[1]</var>}{<var>VARIABLE_NAME + COMP_SOLUTION[1] + SOLUTION[1]</var>}</code>
</p>
</div>
</div>
View
20 exercises/congruent_triangles_1.html
@@ -23,7 +23,7 @@
<var id="TR_A">
function(){
var t = new Triangle( [ 3, -2 ], MAIN, MAIN_SIZE, {} );
- t.labels = { "name": "A", "angles" : clearArray( t.niceAngles, A_ANGLES ), "sides" : clearArray( t.niceSideLengths, A_SIDES ) };
+ t.labels = { "name": "A", "angles" : clearArray( t.niceAngles, A_ANGLES ), "sides" : clearArray( t.niceSideLengths, A_SIDES ) };
return t;
}()
</var>
@@ -38,7 +38,7 @@
<div class="hints">
<p>Triangles are congruent when all corresponding sides and interior angles are congruent. </p>
<p>However, we do not need to know all the values in order to determine whether two triangles are congruent. </p>
- <p>The rules we use for determining congruency are SSS, ASA, SAS and AAS</p>
+ <p>The rules we use for determining congruency are SSS, ASA, SAS and AAS</p>
</div>
<div class="problem">
Are these two triangles congruent?
@@ -51,7 +51,7 @@
TR_A.rotate( randRange( 0, 360 ) );
TR_A.draw();
TR_A.drawLabels();
-
+
TR_B.rotate( randRange( 0, 360 ) );
TR_B.draw();
TR_B.drawLabels();
@@ -81,19 +81,19 @@
<div id="SAS">
<div class="vars">
<var id="A_ANGLES">[ 1 ]</var>
- <var id="A_SIDES">[ 0, 1 ]</var>
+ <var id="A_SIDES">[ 0, 1 ]</var>
</div>
<div class="hints" data-apply="appendContents">
<p>In this problem we are given two sides and an angle between them, so we can use the SAS rule.</p>
<p data-if="IS_B">Triangle B has those two sides and the angle the same as triangle A, so they are congruent.</p>
<p data-else>Because the sides and the angle do not match, triangle A is not congruent with triangle B.</p>
</div>
- </div>
+ </div>
<div id="ASA">
<div class="vars">
<var id="A_ANGLES">[ 0, 1 ]</var>
- <var id="A_SIDES">[ 1 ]</var>
+ <var id="A_SIDES">[ 1 ]</var>
</div>
<div class="hints" data-apply="appendContents">
<p>In this problem we are given two angles and as side between them, so we can use the ASA rule.</p>
@@ -105,7 +105,7 @@
<div id="AAS">
<div class="vars">
<var id="A_ANGLES">[ 0, 1 ]</var>
- <var id="A_SIDES">randRange( 0, 1 ) === 1 ? [ 2 ] : [ 1 ]</var>
+ <var id="A_SIDES">randRange( 0, 1 ) === 1 ? [ 2 ] : [ 1 ]</var>
</div>
<div class="hints" data-apply="appendContents">
<p>In this problem we are given two angles and another side so we can use the AAS rule.</p>
@@ -116,14 +116,14 @@
<div id="AAA">
<div class="vars">
<var id="A_ANGLES">[ 0, 1, 2 ]</var>
- <var id="A_SIDES">[ ]</var>
- <var id="ANSWER">IS_B ? "There is not enough information to say" : "No"</var>
+ <var id="A_SIDES">[ ]</var>
+ <var id="ANSWER">IS_B ? "There is not enough information to say" : "No"</var>
</div>
<div class="hints" data-apply="appendContents">
<p>In this problem we know all three triangle angles.</p>
<p data-if="IS_B">However, having all three angles the same is not a property we can use to conclude that two triangles are congruent. We can only say that they are similar. They are not congruent because they might be different size, yet have same angles.</p>
<p data-else>Because the angles do not match, triangle A is not congruent with triangle B.</p>
- </div>
+ </div>
</div>
</div>
</body>
View
8 exercises/congruent_triangles_2.html
@@ -26,11 +26,11 @@
<var id="TR_A">
function(){
- var trA = new Triangle( [ 3, -5 ], ANGLES ,6, {} );
+ var trA = new Triangle( [ 3, -5 ], ANGLES ,6, {} );
trA.labels = { "points" : [ "A", "B", "C" ], "sides" : clearArray( trA.niceSideLengths, SIDES_A ), "angles" : clearArray( trA.niceAngles, ANGLES_A ) };
return trA;
}()
- </var>
+ </var>
<var id="TR_B">
function(){
var trB = new Triangle( [ TR_A.centroid[ 0 ], TR_A.centroid[ 1 ] ], ANGLES, 6, {} );
@@ -131,13 +131,13 @@
<var id="ANG">ANGLES[ 0 ] / 2</var>
<var id="TR_A">
function(){
- var trA = new Triangle( [ 7, -3 ], ANGLES ,6, {} );
+ var trA = new Triangle( [ 7, -3 ], ANGLES ,6, {} );
trA.rotationCenter = trA.points[ 0 ];
trA.rotate( ANG );
trA.labels = { "points" : [ "", "B", "C" ], "sides" : clearArray( trA.niceSideLengths, SIDES_A ), "angles" : clearArray( trA.niceAngles, ANGLES_A ) };
return trA;
}()
- </var>
+ </var>
<var id="TR_B">
function(){
var trB = new Triangle( [ 7 - cos( ANG * PI / 180 ) * TR_A.sideLengths[ 0 ], -3 - sin( ANG * PI / 180 ) * TR_A.sideLengths[ 0 ] ], [ ANGLES[ 1 ], ANGLES[ 0 ], ANGLES[ 2 ] ] , 6, {} );
View
4 exercises/converting_decimals_to_fractions_1.html
@@ -28,7 +28,7 @@
<var id="H">floor( ( D * 100 ) % 10 )</var>
</div>
<p class="question">Express <code><var>D.toFixed( 2 )</var></code> as a fraction.</p>
- <p class="solution" data-type="rational" data-simplify="optional"><var>D</var></p>
+ <p class="solution" data-type="rational" data-simplify="optional"><var>D</var></p>
<div class="hints">
<p>The number <code><var>T</var></code> is in the tenths place, so we have <var>cardinal( T )</var> tenth<span data-if="T !== 1">s</span>.</p>
<p><var>Cardinal( T )</var> tenth<span data-if="T !== 1">s</span> can be written as <code><var>fraction( T, 10 )</var></code>.</p>
@@ -51,4 +51,4 @@
</div>
</div>
</body>
-</html>
+</html>
View
2  exercises/converting_decimals_to_fractions_2.html
@@ -60,4 +60,4 @@
</div>
</div>
</body>
-</html>
+</html>
View
2  exercises/converting_decimals_to_percents.html
@@ -31,4 +31,4 @@
</div>
</div>
</body>
-</html>
+</html>
View
6 exercises/converting_mixed_numbers_and_improper_fractions.html
@@ -8,13 +8,13 @@
<div class="exercise">
<div class="vars" data-ensure="M_NUM &lt; M_DENOM">
<var id="WHOLE">randRange( 1, 10 )</var>
-
+
<var id="M_NUM">randRange( 1, 30 )</var>
<var id="M_DENOM">randRange( 1, 30 )</var>
<var id="M_REDUCED_NUM">M_NUM / getGCD( M_NUM, M_DENOM )</var>
<var id="M_REDUCED_DENOM">M_DENOM / getGCD( M_NUM, M_DENOM )</var>
-
+
<var id="I_NUM">WHOLE * M_REDUCED_DENOM + M_REDUCED_NUM</var>
<var id="I_DENOM">M_REDUCED_DENOM</var>
</div>
@@ -64,7 +64,7 @@
<p>Note that if we add up the two pieces of our mixed fraction, <code>\color{#28AE7B}{<var>fraction( I_DENOM * WHOLE, I_DENOM, false, false )</var>} + \color{purple}{<var>fraction( M_NUM, M_DENOM, false, true )</var>}</code>, we get the original improper fraction <code><var>fraction( I_NUM, I_DENOM, false, true )</var></code>.</p>
</div>
</div>
-
+
<div id="mixed-to-improper">
<p class="question">Convert <code><var>WHOLE</var>\ <var>fraction( M_NUM, M_DENOM, false, true )</var></code> to an improper fraction.</p>
View
2  exercises/converting_percents_to_decimals.html
@@ -30,4 +30,4 @@
</div>
</div>
</body>
-</html>
+</html>
View
2  exercises/converting_repeating_decimals_to_fractions_1.html
@@ -43,4 +43,4 @@
</div>
</div>
</body>
-</html>
+</html>