Permalink
Browse files

Re-run the linter on the exercises.

  • Loading branch information...
1 parent 4e7297f commit 7041f1ba3399cfb8c19090cb44a41bf1eee4c6af @jeresig jeresig committed Apr 23, 2013
Showing with 2,722 additions and 2,451 deletions.
  1. +1 −1 build/lint_i18n_strings.py
  2. +9 −7 exercises/absolute_value.html
  3. +12 −18 exercises/absolute_value_equations.html
  4. +8 −6 exercises/absolute_value_of_complex_numbers.html
  5. +4 −3 exercises/adding_and_subtracting_complex_numbers.html
  6. +4 −2 exercises/adding_and_subtracting_decimals_word_problems.html
  7. +5 −4 exercises/adding_and_subtracting_fractions.html
  8. +8 −6 exercises/adding_and_subtracting_negative_numbers.html
  9. +6 −4 exercises/adding_and_subtracting_polynomials.html
  10. +6 −4 exercises/adding_and_subtracting_radicals.html
  11. +7 −5 exercises/adding_and_subtracting_rational_expressions.html
  12. +14 −12 exercises/adding_and_subtracting_rational_expressions_0.5.html
  13. +8 −6 exercises/adding_and_subtracting_rational_expressions_1.5.html
  14. +8 −6 exercises/adding_and_subtracting_rational_expressions_2.html
  15. +5 −3 exercises/adding_decimals.html
  16. +5 −3 exercises/adding_decimals_0.5.html
  17. +5 −3 exercises/adding_decimals_2.html
  18. +5 −3 exercises/adding_fractions.html
  19. +6 −4 exercises/adding_fractions_with_common_denominators.html
  20. +6 −4 exercises/adding_negative_numbers.html
  21. +13 −10 exercises/adding_subtracting_mixed_numbers_0.5.html
  22. +15 −12 exercises/adding_subtracting_mixed_numbers_1.html
  23. +14 −12 exercises/adding_vectors.html
  24. +4 −4 exercises/addition_1.html
  25. +7 −5 exercises/addition_2.html
  26. +8 −6 exercises/addition_3.html
  27. +10 −8 exercises/addition_4.html
  28. +13 −10 exercises/age_word_problems.html
  29. +14 −10 exercises/age_word_problems_alternative.html
  30. +4 −2 exercises/alternate_exterior_angles.html
  31. +6 −6 exercises/alternate_exterior_angles_2.html
  32. +4 −2 exercises/alternate_interior_angles.html
  33. +6 −6 exercises/alternate_interior_angles_2.html
  34. +21 −19 exercises/angle_addition_postulate.html
  35. +8 −6 exercises/angle_bisector_theorem.html
  36. +4 −2 exercises/angle_types.html
  37. +118 −120 exercises/angles_1.html
  38. +4 −5 exercises/angles_2.html
  39. +4 −3 exercises/angles_of_a_polygon.html
  40. +4 −5 exercises/area_1.html
  41. +4 −5 exercises/area_of_a_circle.html
  42. +4 −2 exercises/area_of_parallelograms.html
  43. +4 −10 exercises/area_of_squares_and_rectangles.html
  44. +4 −8 exercises/area_of_triangles_1.html
  45. +4 −2 exercises/areas_of_circles_and_sectors.html
  46. +4 −2 exercises/areas_of_trapezoids_rhombi_and_kites.html
  47. +5 −4 exercises/arithmetic_sequences_1.html
  48. +8 −6 exercises/arithmetic_sequences_2.html
  49. +9 −7 exercises/arithmetic_series.html
  50. +4 −45 exercises/arithmetic_word_problems.html
  51. +4 −38 exercises/arithmetic_word_problems_1.html
  52. +4 −23 exercises/arithmetic_word_problems_2.html
  53. +4 −2 exercises/average_word_problems.html
  54. +5 −3 exercises/axis_of_symmetry.html
  55. +81 −77 exercises/balancing_chemical_equations.html
  56. +9 −25 exercises/basic_set_notation.html
  57. +6 −4 exercises/binomial_expansion.html
  58. +5 −3 exercises/chain_rule_1.html
  59. +4 −2 exercises/circles_and_arcs.html
  60. +7 −5 exercises/coin_flip_sequences.html
  61. +9 −6 exercises/combinations_1.html
  62. +12 −10 exercises/combining_like_terms_1.html
  63. +34 −32 exercises/combining_like_terms_2.html
  64. +4 −2 exercises/comparing_absolute_values.html
  65. +8 −17 exercises/comparing_fractions_1.html
  66. +6 −4 exercises/comparing_fractions_2.html
  67. +9 −6 exercises/comparing_improper_fractions_and_mixed_numbers.html
  68. +4 −2 exercises/complementary_and_supplementary_angles.html
  69. +4 −2 exercises/complementary_angles.html
  70. +7 −5 exercises/completing_the_square_1.html
  71. +11 −9 exercises/completing_the_square_2.html
  72. +11 −9 exercises/complex_number_polar_form_intuition.html
  73. +13 −11 exercises/complex_plane_operations.html
  74. +4 −2 exercises/composite_numbers.html
  75. +36 −34 exercises/compound_inequalities.html
  76. +4 −2 exercises/conditional_statements_2.html
  77. +5 −3 exercises/conditional_statements_and_truth_value.html
  78. +17 −15 exercises/congruency_postulates.html
  79. +5 −3 exercises/congruent_angles.html
  80. +7 −5 exercises/congruent_segments.html
  81. +10 −8 exercises/congruent_triangles_1.html
  82. +4 −2 exercises/congruent_triangles_2.html
  83. +33 −22 exercises/constructions_1.html
  84. +6 −4 exercises/converse_inverse_and_contrapositive.html
  85. +11 −9 exercises/converting_between_point_slope_and_slope_intercept.html
  86. +11 −9 exercises/converting_between_point_slope_and_standard_form.html
  87. +7 −5 exercises/converting_between_slope_intercept_and_standard_form.html
  88. +6 −4 exercises/converting_decimals_to_fractions_1.html
  89. +6 −4 exercises/converting_decimals_to_fractions_2.html
  90. +4 −2 exercises/converting_decimals_to_percents.html
  91. +5 −3 exercises/converting_fractions_to_decimals.html
  92. +4 −2 exercises/converting_mixed_numbers_and_improper_fractions.html
  93. +4 −2 exercises/converting_percents_to_decimals.html
  94. +8 −6 exercises/converting_repeating_decimals_to_fractions_1.html
  95. +9 −7 exercises/converting_repeating_decimals_to_fractions_2.html
  96. +36 −34 exercises/converting_temperatures.html
  97. +4 −2 exercises/corresponding_angles.html
  98. +6 −6 exercises/corresponding_angles_2.html
  99. +11 −8 exercises/counting_1.html
  100. +17 −14 exercises/counting_1_alternative.html
  101. +8 −5 exercises/counting_2.html
  102. +4 −5 exercises/creating_bar_charts_1.html
  103. +11 −9 exercises/creating_box_and_whisker_plots.html
  104. +11 −9 exercises/cube_roots.html
  105. +4 −4 exercises/decimals_on_the_number_line_1.html
  106. +11 −9 exercises/decimals_on_the_number_line_2.html
  107. +18 −16 exercises/defined_and_undefined_matrix_operations.html
  108. +5 −3 exercises/degrees_to_radians.html
  109. +9 −27 exercises/dependent_probability.html
  110. +9 −7 exercises/derivative_intuition.html
  111. +9 −7 exercises/derivatives_1.html
  112. +4 −3 exercises/dice_probability.html
  113. +8 −6 exercises/direct_and_inverse_variation.html
  114. +4 −2 exercises/discount_tax_and_tip_word_problems.html
  115. +16 −14 exercises/distance_between_point_and_line.html
  116. +17 −13 exercises/distance_formula.html
  117. +4 −2 exercises/distributive_property.html
  118. +14 −11 exercises/dividing_complex_numbers.html
  119. +5 −3 exercises/dividing_decimals.html
  120. +6 −4 exercises/dividing_decimals_0.5.html
  121. +5 −3 exercises/dividing_decimals_1.html
  122. +5 −3 exercises/dividing_decimals_2.html
  123. +6 −4 exercises/dividing_fractions.html
  124. +6 −4 exercises/dividing_fractions_0.5.html
  125. +8 −6 exercises/dividing_fractions_alternative.html
  126. +4 −2 exercises/dividing_fractions_word_problems.html
  127. +5 −5 exercises/dividing_polynomials_by_binomials_1.html
  128. +4 −2 exercises/dividing_polynomials_by_binomials_2.html
  129. +8 −6 exercises/dividing_polynomials_by_binomials_3.html
  130. +5 −3 exercises/divisibility.html
  131. +6 −4 exercises/divisibility_0.5.html
  132. +4 −4 exercises/divisibility_intuition.html
  133. +15 −10 exercises/divisibility_tests.html
  134. +6 −4 exercises/division_0.5.html
  135. +5 −3 exercises/division_1.5.html
  136. +6 −4 exercises/division_1.html
  137. +5 −3 exercises/division_2.html
  138. +5 −3 exercises/division_3.html
  139. +5 −3 exercises/division_4.html
  140. +9 −7 exercises/domain_and_range_0.5.html
  141. +33 −31 exercises/domain_of_a_function.html
  142. +4 −6 exercises/empirical_rule.html
  143. +4 −2 exercises/equation_of_a_circle_1.html
  144. +4 −2 exercises/equation_of_a_circle_2.html
  145. +8 −6 exercises/equation_of_a_hyperbola.html
  146. +3 −2 exercises/equation_of_a_line.html
  147. +4 −2 exercises/equation_of_an_ellipse.html
  148. +6 −4 exercises/equivalent_fractions.html
  149. +9 −7 exercises/equivalent_fractions_2.html
  150. +17 −15 exercises/equivalent_fractions_3.html
  151. +4 −2 exercises/estimation_with_decimals.html
  152. +7 −3 exercises/evaluating_expressions_1.html
  153. +12 −4 exercises/evaluating_expressions_2.html
  154. +17 −14 exercises/even_and_odd_functions.html
  155. +5 −4 exercises/expected_value.html
  156. +11 −9 exercises/exploring_angle_pairs_1.html
  157. +13 −9 exercises/exploring_mean_and_median.html
  158. +8 −6 exercises/exploring_standard_deviation_1.html
  159. +5 −3 exercises/exponent_rules.html
  160. +10 −7 exercises/exponents_1.html
  161. +7 −5 exercises/exponents_2.html
  162. +14 −12 exercises/exponents_2_alternative.html
  163. +7 −5 exercises/exponents_3.html
  164. +13 −10 exercises/exponents_4.html
  165. +4 −3 exercises/expressing_ratios_as_fractions.html
  166. +5 −3 exercises/expressions_with_unknown_variables.html
  167. +5 −3 exercises/expressions_with_unknown_variables_2.html
  168. +4 −2 exercises/factor_expressions_by_grouping.html
  169. +5 −3 exercises/factoring_difference_of_squares_1.html
  170. +5 −3 exercises/factoring_difference_of_squares_2.html
  171. +5 −3 exercises/factoring_difference_of_squares_3.html
  172. +8 −6 exercises/factoring_linear_binomials.html
  173. +4 −2 exercises/factoring_polynomials_1.html
  174. +4 −2 exercises/factoring_polynomials_1_solution_only.html
  175. +4 −2 exercises/factoring_polynomials_1_steps_only.html
  176. +5 −3 exercises/factoring_polynomials_1_video_hint.html
  177. +8 −6 exercises/factoring_polynomials_2.html
  178. +13 −11 exercises/factoring_polynomials_by_grouping_1.html
  179. +9 −7 exercises/factoring_polynomials_with_two_variables.html
  180. +6 −22 exercises/fraction_word_problems_1.html
  181. +10 −8 exercises/fractions_cut_and_copy_1.html
  182. +13 −11 exercises/fractions_cut_and_copy_2.html
  183. +4 −3 exercises/fractions_on_the_number_line_1.html
  184. +16 −14 exercises/fractions_on_the_number_line_2.html
  185. +16 −14 exercises/fractions_on_the_number_line_3.html
  186. +10 −8 exercises/functions_1.html
  187. +5 −3 exercises/functions_2.html
  188. +6 −4 exercises/functions_3.html
  189. +4 −2 exercises/geometric_sequences_1.html
  190. +8 −6 exercises/geometric_sequences_2.html
  191. +4 −2 exercises/geometry_proofs_1.html
  192. +9 −7 exercises/geometry_proofs_2.html
  193. +13 −11 exercises/geometry_proofs_intro.html
  194. +6 −3 exercises/graphing_circles.html
  195. +15 −9 exercises/graphing_circles_2.html
  196. +6 −10 exercises/graphing_inequalities.html
  197. +6 −10 exercises/graphing_inequalities_2.html
  198. +5 −5 exercises/graphing_linear_equations.html
  199. +5 −3 exercises/graphing_parabolas_0.5.html
  200. +8 −6 exercises/graphing_parabolas_1.html
  201. +8 −6 exercises/graphing_parabolas_2.html
  202. +8 −6 exercises/graphing_points.html
  203. +16 −14 exercises/graphing_points_2.html
  204. +4 −10 exercises/graphing_systems_of_equations.html
  205. +8 −18 exercises/graphing_systems_of_inequalities.html
  206. +8 −18 exercises/graphing_systems_of_inequalities_2.html
  207. +7 −9 exercises/graphs_of_inequalities.html
  208. +16 −11 exercises/graphs_of_sine_and_cosine.html
  209. +6 −4 exercises/greatest_common_divisor.html
  210. +15 −13 exercises/greatest_common_divisor_alternative.html
  211. +4 −2 exercises/herons_formula.html
  212. +4 −5 exercises/ideal_stoichiometry.html
  213. +8 −6 exercises/identifying_points_1.html
  214. +8 −6 exercises/identifying_points_2.html
  215. +6 −5 exercises/imaginary_unit_powers.html
  216. +6 −15 exercises/independent_probability.html
  217. +14 −12 exercises/inequalities_on_a_number_line.html
  218. +4 −2 exercises/inscribed_angles_1.html
  219. +5 −3 exercises/inscribed_angles_2.html
  220. +4 −2 exercises/inscribed_angles_3.html
  221. +7 −5 exercises/integer_sums.html
  222. +18 −14 exercises/interesting_perimeter_problems.html
  223. +4 −3 exercises/interpreting_linear_equations.html
  224. +11 −9 exercises/inverse_trig_functions.html
  225. +13 −10 exercises/inverses_of_functions.html
  226. +34 −34 exercises/khan-exercise.html
  227. +80 −45 exercises/khan-site.html
  228. +16 −15 exercises/law_of_cosines.html
  229. +13 −12 exercises/law_of_sines.html
  230. +4 −2 exercises/least_common_multiple.html
  231. +14 −65 exercises/least_common_multiple_and_greatest_common_divisor_word_problems.html
  232. +8 −10 exercises/lhopitals_rule.html
  233. +4 −16 exercises/limiting_reagent_stoichiometry.html
  234. +26 −24 exercises/limits_1.html
  235. +7 −8 exercises/limits_2.html
  236. +14 −12 exercises/line_graph_intuition.html
  237. +20 −18 exercises/line_relationships.html
  238. +5 −5 exercises/linear_equation_word_problems.html
  239. +4 −2 exercises/linear_equations_1.html
  240. +5 −4 exercises/linear_equations_2.html
  241. +6 −6 exercises/linear_equations_3.html
  242. +7 −8 exercises/linear_equations_4.html
  243. +5 −4 exercises/linear_inequalities.html
  244. +5 −5 exercises/logarithms_1.5.html
  245. +5 −3 exercises/logarithms_1.html
  246. +5 −3 exercises/logarithms_2.html
  247. +12 −10 exercises/logical_arguments_deductive_reasoning.html
  248. +11 −6 exercises/markup_and_commission_word_problems.html
  249. +9 −7 exercises/matrix_addition_and_subtraction.html
  250. +4 −2 exercises/matrix_determinant_2x2.html
  251. +5 −3 exercises/matrix_determinant_2x2_video_hint.html
  252. +4 −2 exercises/matrix_determinant_3x3.html
  253. +5 −3 exercises/matrix_determinant_3x3_video_hint.html
  254. +9 −7 exercises/matrix_dimensions.html
  255. +7 −5 exercises/matrix_inverse_2x2.html
  256. +7 −5 exercises/matrix_inverse_3x3.html
  257. +7 −5 exercises/matrix_transpose.html
  258. +8 −6 exercises/mean_median_and_mode.html
  259. +7 −5 exercises/measuring_angles.html
  260. +4 −2 exercises/measuring_segments.html
  261. +12 −10 exercises/midpoint_formula.html
  262. +9 −7 exercises/midpoint_of_a_segment.html
  263. +6 −4 exercises/multiplication_0.5.html
  264. +6 −4 exercises/multiplication_1.5.html
  265. +7 −5 exercises/multiplication_1.html
  266. +6 −4 exercises/multiplication_2.html
  267. +6 −4 exercises/multiplication_3.html
  268. +5 −3 exercises/multiplication_4.html
  269. +7 −5 exercises/multiplying_a_matrix_by_a_matrix.html
  270. +7 −5 exercises/multiplying_a_matrix_by_a_vector.html
  271. +21 −19 exercises/multiplying_and_dividing_complex_number_polar_forms.html
  272. +11 −9 exercises/multiplying_and_dividing_negative_numbers.html
  273. +8 −6 exercises/multiplying_and_dividing_rational_expressions_1.html
  274. +7 −5 exercises/multiplying_and_dividing_scientific_notation.html
  275. +7 −5 exercises/multiplying_complex_numbers.html
  276. +6 −4 exercises/multiplying_decimals.html
  277. +5 −3 exercises/multiplying_expressions_0.5.html
  278. +5 −3 exercises/multiplying_expressions_1.html
  279. +19 −17 exercises/multiplying_fractions.html
  280. +14 −15 exercises/multiplying_fractions_0.5.html
  281. +4 −2 exercises/multiplying_fractions_by_integers.html
  282. +4 −2 exercises/multiplying_fractions_word_problems.html
  283. +7 −4 exercises/multiplying_mixed_numbers_1.html
  284. +11 −9 exercises/multiplying_polynomials.html
  285. +4 −2 exercises/multiplying_radicals.html
  286. +20 −33 exercises/multistep_equations_with_distribution.html
  287. +4 −4 exercises/negative_number_word_problems.html
  288. +6 −4 exercises/new_definitions_1.html
  289. +4 −6 exercises/new_definitions_2.html
  290. +4 −3 exercises/number_line.html
  291. +4 −4 exercises/number_line_2.html
  292. +5 −6 exercises/number_line_3.html
  293. +6 −3 exercises/number_properties_terminology_1.html
  294. +24 −14 exercises/one_step_equation_intuition.html
  295. +17 −18 exercises/one_step_equations.html
  296. +8 −10 exercises/one_step_equations_0.5.html
  297. +14 −12 exercises/one_step_inequalities.html
  298. +4 −2 exercises/order_of_operations.html
  299. +4 −2 exercises/ordering_fractions.html
  300. +5 −3 exercises/ordering_improper_fractions_and_mixed_numbers.html
Sorry, we could not display the entire diff because too many files (450) changed.
View
2 build/lint_i18n_strings.py
@@ -376,7 +376,7 @@ def process_node(self, orig_node):
if len(self.match_keys) > 1:
self.errors.append("Contains too many different keys (%s):\n%s" % (
", ".join(self.match_keys),
- extract_strings.get_outerhtml(node)))
+ extract_strings.get_outerhtml(orig_node)))
return orig_node
# Only continue if there are keys to process
View
16 exercises/absolute_value.html
@@ -1,14 +1,15 @@
<!DOCTYPE html>
-<html data-require="math graphie graphie-helpers"><head>
+<html data-require="math graphie graphie-helpers">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Finding absolute values</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
- <div class="vars" data-ensure='SIGN === "" || INT !== 0 || FRAC !== ""'>
- <var id="INT">rand(5) &gt; 0 ? randRange( 1, 9 ) : 0</var>
- <var id="FRAC">rand(3) &gt; 0 ? "." + randRange(1, 9) : ""</var>
+ <div class="vars" data-ensure="SIGN === &quot;&quot; || INT !== 0 || FRAC !== &quot;&quot;">
+ <var id="INT">rand(5) > 0 ? randRange( 1, 9 ) : 0</var>
+ <var id="FRAC">rand(3) > 0 ? "." + randRange(1, 9) : ""</var>
<var id="SIGN">randFromArray(["", "-"])</var>
</div>
@@ -39,13 +40,14 @@
numberLine( start, end );
style({ stroke: "#6495ED", fill: "#6495ED" });
graph.pt = circle( [ x, 0 ], 0.15 );
- style({ stroke: "#FFA500", fill: "#FFA500", strokeWidth: 3.5, arrows: "-&gt;" });
+ style({ stroke: "#FFA500", fill: "#FFA500", strokeWidth: 3.5, arrows: "->" });
path( [ [ originX, 0 ], [ x, 0 ] ] );
circle( [ originX, 0 ], 0.10 );
graph.pt.toFront();
</div>
<p>The distance from <code>0</code> to <code><var>SIGN + INT + FRAC</var></code> is <code><var>INT + FRAC</var></code>, which equals the absolute value.</p>
- <p data-if='SIGN !== ""'>In other words, <code><var>INT + FRAC</var></code> is the non-negative version of <code><var>SIGN + INT + FRAC</var></code>.</p>
+ <p data-if="SIGN !== &quot;&quot;">In other words, <code><var>INT + FRAC</var></code> is the non-negative version of <code><var>SIGN + INT + FRAC</var></code>.</p>
</div>
</div>
-</body></html>
+</body>
+</html>
View
30 exercises/absolute_value_equations.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math math-format"><head>
+<html data-require="math math-format">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Absolute value equations</title>
<script src="../khan-exercise.js"></script>
@@ -107,7 +108,7 @@
<div class="hints">
<div data-if="A &gt; C" data-unwrap="">
<div>
- <p data-if="C &amp;gt; 0">
+ <p data-if="C &gt; 0">
Subtract
<code>
\red{<var>abs(C)</var>|x + <var>E</var>|}
@@ -120,7 +121,6 @@
</code>
to both sides:
</p>
-
<p><code>\qquad\begin{eqnarray}
<var>A</var>|x + <var>E</var>| + <var>B</var>
&amp;=&amp;
@@ -136,7 +136,7 @@
</code></p>
</div>
<div>
- <p data-if="B &amp;gt; 0">
+ <p data-if="B &gt; 0">
Subtract
<code>\red{<var>abs(B)</var>}</code>
from both sides:
@@ -145,7 +145,6 @@
<code>\red{<var>abs(B)</var>}</code>
to both sides:
</p>
-
<p><code>\qquad\begin{eqnarray}
<var>A - C</var>|x + <var>E</var>| +
<var>B</var> &amp;=&amp; <var>D</var> \\ \\
@@ -200,7 +199,7 @@
</code></p>
</div>
<div>
- <p data-if="E &amp;gt; 0">
+ <p data-if="E &gt; 0">
Subtract
<code>\red{<var>abs(E)</var>}</code>
from both
@@ -211,7 +210,6 @@
to both
sides:
</p>
-
<p><code>\qquad\begin{eqnarray}
x + <var>E</var> &amp;=&amp;
-<var>SIMPLIFIED</var> \\ \\
@@ -251,7 +249,7 @@
</code></p>
</div>
<div>
- <p data-if="E &amp;gt; 0">
+ <p data-if="E &gt; 0">
Subtract
<code>\red{<var>abs(E)</var>}</code>
from both
@@ -262,7 +260,6 @@
to both
sides:
</p>
-
<p><code>\qquad\begin{eqnarray}
x + <var>E</var> &amp;=&amp;
<var>SIMPLIFIED</var> \\ \\
@@ -296,7 +293,7 @@
</div>
<div data-else="" data-unwrap="">
<div>
- <p data-if="A &amp;gt; 0">
+ <p data-if="A &gt; 0">
Subtract
<code>
\red{<var>A</var>|x + <var>E</var>|}
@@ -309,7 +306,6 @@
</code>
to both sides:
</p>
-
<p><code>\qquad\begin{eqnarray}
<var>A</var>|x + <var>E</var>| + <var>B</var>
&amp;=&amp;
@@ -324,7 +320,7 @@
</code></p>
</div>
<div>
- <p data-if="D &amp;gt; 0">
+ <p data-if="D &gt; 0">
Subtract
<code><var>abs(D)</var></code>
from both sides:
@@ -333,7 +329,6 @@
<code><var>abs(D)</var></code>
to both sides:
</p>
-
<p><code>\qquad\begin{eqnarray}
<var>B</var> &amp;=&amp;
<var>C - A</var>|x + <var>E</var>| +
@@ -389,7 +384,7 @@
</p>
</div>
<div>
- <p data-if="E &amp;gt; 0">
+ <p data-if="E &gt; 0">
Subtract
<code>\red{<var>abs(E)</var>}</code>
from both
@@ -400,7 +395,6 @@
to both
sides:
</p>
-
<p><code>\qquad\begin{eqnarray}
- <var>SIMPLIFIED</var> &amp;=&amp;
x + <var>E</var> \\ \\
@@ -440,7 +434,7 @@
</code></p>
</div>
<div>
- <p data-if="E &amp;gt; 0">
+ <p data-if="E &gt; 0">
Subtract
<code>\red{<var>abs(E)</var>}</code>
from both
@@ -451,7 +445,6 @@
to both
sides:
</p>
-
<p><code>\qquad\begin{eqnarray}
<var>SIMPLIFIED</var> &amp;=&amp;
x + <var>E</var> \\ \\
@@ -501,4 +494,5 @@
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
14 exercises/absolute_value_of_complex_numbers.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
-<html data-require="math graphie math-format"><head>
- <meta charset="UTF-8">
+<html data-require="math graphie math-format">
+<head>
+ <meta charset="UTF-8" />
<title>Absolute value of complex numbers</title>
<script src="../khan-exercise.js"></script>
</head>
@@ -76,8 +77,8 @@
</p>
</div>
<p>
- Substituting into the Pythagorean theorem:<br>
- <code>\qquad |<var>REPRESENTATION</var>|^2 = <var>abs( REAL )</var>^2 + <var>abs( IMAG )</var>^2</code>, so <br>
+ Substituting into the Pythagorean theorem:<br />
+ <code>\qquad |<var>REPRESENTATION</var>|^2 = <var>abs( REAL )</var>^2 + <var>abs( IMAG )</var>^2</code>, so <br />
<code>\qquad |<var>REPRESENTATION</var>| = \sqrt{<var>abs( REAL )</var>^2 + <var>abs( IMAG )</var>^2}</code>.
</p>
<p>
@@ -86,11 +87,12 @@
<p data-if="squareRootCanSimplify( ABS_SQUARE )">
Simplifying the radical gives <code><var>formattedSquareRootOf( ABS_SQUARE )</var></code>. That is the absolute value of <code><var>REPRESENTATION</var></code>.
</p>
- <p data-else="">
+ <p data-else>
The radical cannot be simplified. The absolute value of <code><var>REPRESENTATION</var></code> is <code>\sqrt{<var>ABS_SQUARE</var>}</code>.
</p>
</div>
</div>
</div>
</div>
-</body></html>
+</body>
+
View
7 exercises/adding_and_subtracting_complex_numbers.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math math-format"><head>
+<html data-require="math math-format">
+<head>
<meta charset="UTF-8">
<title>Adding and subtracting complex numbers</title>
<script src="../khan-exercise.js"></script>
@@ -48,7 +49,6 @@
<div class="problems">
<div>
<p class="question" data-if='OPERATION == "add"'>Add the following complex numbers:</p><p class="question" data-else="">Subtract the following complex numbers:</p>
-
<p>
<code>
(<var>A_REP_COLORED</var>) <var>OPERATOR</var> (<var>B_REP_COLORED</var>)
@@ -97,4 +97,5 @@
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
6 exercises/adding_and_subtracting_decimals_word_problems.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math word-problems spin graphie graphie-helpers-arithmetic"><head>
+<html data-require="math word-problems spin graphie graphie-helpers-arithmetic">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding and subtracting decimals word problems</title>
<script src="../khan-exercise.js"></script>
@@ -266,4 +267,5 @@
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
9 exercises/adding_and_subtracting_fractions.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math math-format"><head>
+<html data-require="math math-format">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding and subtracting fractions</title>
<script src="../khan-exercise.js"></script>
@@ -36,8 +37,7 @@
<p><code><var>fraction( N1 * F1, LCM )</var> + <var>fraction( N2 * F2, LCM )</var> = {?}</code></p>
</div>
<div>
- <p data-if="N2 &amp;gt; 0">Add the numerators.</p><p data-else="">Subtract the numerators.</p>
-
+ <p data-if="N2 &gt; 0">Add the numerators.</p><p data-else="">Subtract the numerators.</p>
<p><code><var>fraction( F1 * N1 + F2 * N2, LCM)</var></code></p>
</div>
<div data-if="getGCD( F1 * N1 + F2 * N2, LCM ) !== 1">
@@ -46,4 +46,5 @@
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
14 exercises/adding_and_subtracting_negative_numbers.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math graphie graphie-helpers"><head>
+<html data-require="math graphie graphie-helpers">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding and subtracting negative numbers</title>
<script src="../khan-exercise.js"></script>
@@ -31,7 +32,7 @@
"right" );
</div>
</div>
- <div class="solution" data-forms="integer"><var>ANSWER</var></div>
+ <div class="solution"><var>ANSWER</var></div>
<div class="hints">
<div class="graphie" data-update="numbers">
REMOVE = label( [0, -1],
@@ -45,7 +46,7 @@
<div class="graphie" data-update="numbers">
style({
stroke: "#28AE7B",
- arrows: "-&gt;"
+ arrows: "->"
}, function(){
path( [ [ 1 + A - START, -2 ], [ 1 + ANSWER - START, -2] ] );
});
@@ -81,7 +82,7 @@
"right" );
</div>
</div>
- <div class="solution" data-forms="integer"><var>ANSWER</var></div>
+ <div class="solution"><var>ANSWER</var></div>
<div class="hints">
<div class="graphie" data-update="numbers">
REMOVE = label( [0, -1],
@@ -95,7 +96,7 @@
<div class="graphie" data-update="numbers">
style({
stroke: "#28AE7B",
- arrows: "-&gt;"
+ arrows: "->"
}, function(){
path( [ [ 1 + A - START, -2 ], [ 1 + ANSWER - START, -2] ] );
});
@@ -114,4 +115,5 @@
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
10 exercises/adding_and_subtracting_polynomials.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math math-format polynomials functional"><head>
+<html data-require="math math-format polynomials functional">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding and subtracting polynomials</title>
<script src="../khan-exercise.js"></script>
@@ -39,7 +40,7 @@
<var id="COLORS">[ BLUE, ORANGE, GREEN ]</var>
<var id="MAX_DEGREE">7</var>
<var id="NON_ZERO_INDICES">randRangeUniqueNonZero( 0, MAX_DEGREE, randRange(2, 3) ).sort().reverse()</var>
- <var id="POL_1, POL_2" data-ensure="POL_1.add( POL_2 ).getNumberOfTerms() &gt;= 1 &amp;&amp; POL_1.subtract( POL_2 ).getNumberOfTerms() &gt;= 1">tabulate( function() {
+ <var id="POL_1, POL_2" data-ensure="POL_1.add( POL_2 ).getNumberOfTerms() >= 1 && POL_1.subtract( POL_2 ).getNumberOfTerms() >= 1">tabulate( function() {
var coefs = [];
for ( var i = 0; i &lt;= MAX_DEGREE; i++ ) {
var value = 0;
@@ -102,7 +103,7 @@
</div>
<div>
<p>Identify like terms.</p>
- <p><code><span data-each="[ POL_1, POL_2 ] as POL"><span data-each="NON_ZERO_INDICES as n, index" data-unwrap=""><var>( POL.coefs[ index ] &lt; 0 ) ? "-" : ( n === 0 &amp;&amp; POL === POL_1 ) ? "" : "+"</var>\color{<var>COLORS[ n ]</var>}{<var>abs( POL.coefs[ index ] ) === 1 ? "" : abs( POL.coefs[ index ] )</var><var>X</var>^<var>index</var>}</span></span></code></p>
+ <p><code><span data-each="[ POL_1, POL_2 ] as POL"><span data-each="NON_ZERO_INDICES as n, index" data-unwrap><var>( POL.coefs[ index ] &lt; 0 ) ? "-" : ( n === 0 && POL === POL_1 ) ? "" : "+"</var>\color{<var>COLORS[ n ]</var>}{<var>abs( POL.coefs[ index ] ) === 1 ? "" : abs( POL.coefs[ index ] )</var><var>X</var>^<var>index</var>}</span></span></code></p>
</div>
<div>
@@ -115,4 +116,5 @@
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
10 exercises/adding_and_subtracting_radicals.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math math-format expressions"><head>
+<html data-require="math math-format expressions">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding and subtracting radicals</title>
<script src="../khan-exercise.js"></script>
@@ -83,8 +84,8 @@
<var id="A">pow( A_COEFF, 2 ) * NUM</var>
<var id="B">pow( B_COEFF, 2 ) * NUM</var>
<var id="C">pow( C_COEFF, 2 ) * NUM</var>
- <var id="B_SIGN">B_COEFF &gt; 0 ? "+" : "-"</var>
- <var id="C_SIGN">C_COEFF &gt; 0 ? "+" : "-"</var>
+ <var id="B_SIGN">B_COEFF > 0 ? "+" : "-"</var>
+ <var id="C_SIGN">C_COEFF > 0 ? "+" : "-"</var>
</div>
<p class="question">Simplify the following expression:</p>
<p><code>\sqrt{<var>A</var>}<var>B_SIGN</var>\sqrt{<var>B</var>}<var>C_SIGN</var>\sqrt{<var>C</var>}</code></p>
@@ -106,4 +107,5 @@
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
12 exercises/adding_and_subtracting_rational_expressions.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math math-format expressions rational-expressions"><head>
+<html data-require="math math-format expressions rational-expressions">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding and subtracting with like denominators</title>
<script src="../khan-exercise.js"></script>
@@ -69,8 +70,8 @@
<div class="input-format">
<div class="entry" data-type="multiple">
<table>
- <tbody><tr>
- <td class="soln-name" rowspan="2">
+ <tr>
+ <td rowspan="2" class="soln-name">
<code><var>Y</var> = </code>
</td>
<td class="soln-top">
@@ -82,7 +83,7 @@
<span class="sol short50" data-fallback="1">a</span>
</td>
</tr>
- </tbody></table>
+ </table>
</div>
</div>
@@ -131,4 +132,5 @@
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
26 exercises/adding_and_subtracting_rational_expressions_0.5.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math math-format expressions rational-expressions"><head>
+<html data-require="math math-format expressions rational-expressions">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding and subtracting with like denominators</title>
<script src="../khan-exercise.js"></script>
@@ -46,18 +47,18 @@
<div class="solution" data-type="multiple">
<table>
- <tbody><tr>
- <td class="soln-name" rowspan="2"><code><var>Y</var>=</code></td>
+ <tr>
+ <td rowspan="2" class="soln-name"><code><var>Y</var>=</code></td>
<td class="soln-top">
<span class="sol short50" data-type="regex"><var>NUMERSOL.regex()</var></span>
</td>
</tr>
<tr>
<td class="soln-bot">
- <span class="sol short50" data-fallback="1" data-type="number"><var>DENOMSOL</var></span>
+ <span class="sol short50" data-type="number" data-fallback="1"><var>DENOMSOL</var></span>
</td>
</tr>
- </tbody></table>
+ </table>
</div>
</div>
@@ -76,8 +77,8 @@
<div class="solution" data-type="multiple">
<table>
- <tbody><tr>
- <td class="soln-name" rowspan="2"><code><var>Y</var>=</code></td>
+ <tr>
+ <td rowspan="2" class="soln-name"><code><var>Y</var>=</code></td>
<td class="soln-top">
<span class="sol short50" data-type="number"><var>NUMERSOL</var></span>
</td>
@@ -87,7 +88,7 @@
<span class="sol short50" data-type="regex"><var>DENOMSOL.regex()</var></span>
</td>
</tr>
- </tbody></table>
+ </table>
</div>
</div>
@@ -105,7 +106,7 @@
<div data-if="SIGN === '+'">
<p><code><var>Y</var> = \dfrac{<var>NUMERATOR1</var> <var>SIGN</var> <var>NUMERATOR2</var>}{<var>DENOMINATOR</var>}</code></p>
</div>
- <div data-else="">
+ <div data-else>
<p><code><var>Y</var> = \dfrac{<var>NUMERATOR1</var> <var>SIGN</var> (<var>NUMERATOR2</var>)}{<var>DENOMINATOR</var>}</code></p>
</div>
</div>
@@ -115,9 +116,10 @@
</div>
<div data-if="FACTOR !== 1">
<p>Simplify by dividing numerator and denominator by <var>FACTOR</var>:</p>
- <p><code><var>Y</var> = \dfrac{<var>NUMERSOL</var>}{<var>DENOMSOL</var>}</code></p><p>
- </p><p data-if="DENOMSOL === 1"><code><var>Y</var> = <var>NUMERSOL</var></code></p>
+ <p><code><var>Y</var> = \dfrac{<var>NUMERSOL</var>}{<var>DENOMSOL</var>}</code><p>
+ <p data-if="DENOMSOL === 1"><code><var>Y</var> = <var>NUMERSOL</var></code></p>
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
14 exercises/adding_and_subtracting_rational_expressions_1.5.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math expressions rational-expressions"><head>
+<html data-require="math expressions rational-expressions">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding and subtracting with like denominators</title>
<script src="../khan-exercise.js"></script>
@@ -84,8 +85,8 @@
<div class="input-format">
<div class="entry" data-type="multiple">
<table>
- <tbody><tr>
- <td class="soln-name" rowspan="2">
+ <tr>
+ <td rowspan="2" class="soln-name">
<code><var>Y</var> = </code>
</td>
<td class="soln-top">
@@ -97,7 +98,7 @@
<span class="sol short64" data-fallback="1">a</span>
</td>
</tr>
- </tbody></table>
+ </table>
</div>
</div>
@@ -113,7 +114,7 @@
<p>Since the expressions have the same denominator we simply combine the numerators:</p>
<p><code><var>Y</var> = \dfrac{<var>NUMERATOR1</var> + <var>NUMERATOR2</var>}{<var>DENOMINATOR</var>}</code></p>
</div>
- <div data-else="">
+ <div data-else>
<p>Since the expressions have the same denominator we simply combine the numerators:</p>
<p><code><var>Y</var> = \dfrac{<var>NUMERATOR1</var> - (<var>NUMERATOR2</var>)}{<var>DENOMINATOR</var>}</code></p>
</div>
@@ -128,4 +129,5 @@
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
14 exercises/adding_and_subtracting_rational_expressions_2.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math math-format expressions rational-expressions"><head>
+<html data-require="math math-format expressions rational-expressions">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding and subtracting with like denominators 2</title>
<script src="../khan-exercise.js"></script>
@@ -97,8 +98,8 @@
<div class="input-format">
<div class="entry" data-type="multiple">
<table>
- <tbody><tr>
- <td class="soln-name" rowspan="2">
+ <tr>
+ <td rowspan="2" class="soln-name">
<code><var>Y</var> = </code>
</td>
<td class="soln-top">
@@ -110,13 +111,13 @@
<span class="sol short50" data-fallback="1">a</span>
</td>
</tr>
- </tbody></table>
+ </table>
</div>
</div>
</div>
<div class="hints">
- <p>In order to <span data-if="SIGN === '+'">add</span><span data-else="">subtract</span> expressions,
+ <p>In order to <span data-if="SIGN === '+'">add</span><span data-else>subtract</span> expressions,
they must have a common denominator.</p>
<p>The smallest common denominator is the least common multiple of <code><var>D1</var></code> and <code><var>D2</var></code>.</p>
<p><code>\lcm(<var>D1</var>, <var>D2</var>) = <var>DENOMINATOR</var></code></p>
@@ -133,4 +134,5 @@
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
8 exercises/adding_decimals.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math graphie graphie-helpers-arithmetic"><head>
+<html data-require="math graphie graphie-helpers-arithmetic">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding decimals</title>
<script src="../khan-exercise.js"></script>
@@ -49,9 +50,10 @@
graph.adder.show();
graph.adder.showDecimals(A_DECIMAL, B_DECIMAL);
</div>
- <div class="graphie" data-each="DUMMY as dummy" data-update="numbers">
+ <div class="graphie" data-update="numbers" data-each="DUMMY as dummy">
graph.adder.showHint();
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
8 exercises/adding_decimals_0.5.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math graphie graphie-helpers-arithmetic"><head>
+<html data-require="math graphie graphie-helpers-arithmetic">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding decimals 0.5</title>
<script src="../khan-exercise.js"></script>
@@ -47,9 +48,10 @@
graph.adder.show();
graph.adder.showDecimals( A_DECIMAL, B_DECIMAL );
</div>
- <div class="graphie" data-each="DUMMY as dummy" data-update="numbers">
+ <div class="graphie" data-update="numbers" data-each="DUMMY as dummy">
graph.adder.showHint();
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
8 exercises/adding_decimals_2.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math graphie graphie-helpers-arithmetic"><head>
+<html data-require="math graphie graphie-helpers-arithmetic">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding decimals 2</title>
<script src="../khan-exercise.js"></script>
@@ -47,9 +48,10 @@
graph.adder.show();
graph.adder.showDecimals( A_DECIMAL, B_DECIMAL );
</div>
- <div class="graphie" data-each="DUMMY as dummy" data-update="numbers">
+ <div class="graphie" data-update="numbers" data-each="DUMMY as dummy">
graph.adder.showHint();
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
8 exercises/adding_fractions.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math math-format"><head>
+<html data-require="math math-format">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding fractions</title>
<script src="../khan-exercise.js"></script>
@@ -28,7 +29,7 @@
<p class="solution" data-type="rational"><var>N1 / D1 + N2 / D2</var></p>
</div>
- <div id="custom-8" data-type="add-fractions" data-weight="0">
+ <div id="custom-8" data-weight="0" data-type="add-fractions">
<div class="vars">
<var id="N1">1</var>
<var id="D1">2</var>
@@ -67,4 +68,5 @@
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
10 exercises/adding_fractions_with_common_denominators.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math math-format graphie graphie-helpers"><head>
+<html data-require="math math-format graphie graphie-helpers">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding fractions with common denominators</title>
<script src="../khan-exercise.js"></script>
@@ -17,10 +18,10 @@
<div class="question">
<p><code><var>fraction( N1, D )</var> + <var>fraction( N2, D )</var> = {?}</code></p>
</div>
- <div class="solution" data-simplify="optional" data-type="rational"><var>( N1 + N2 ) / D</var></div>
+ <div class="solution" data-type="rational" data-simplify="optional"><var>( N1 + N2 ) / D</var></div>
</div>
- <div id="custom-5" data-type="add-fractions" data-weight="0">
+ <div id="custom-5" data-weight="0" data-type="add-fractions">
<div class="vars">
<var id="N1">1</var>
<var id="N2">1</var>
@@ -56,4 +57,5 @@
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
10 exercises/adding_negative_numbers.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math graphie graphie-helpers"><head>
+<html data-require="math graphie graphie-helpers">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding negative numbers</title>
<script src="../khan-exercise.js"></script>
@@ -31,7 +32,7 @@
"right" );
</div>
</div>
- <div class="solution" data-forms="integer"><var>ANSWER</var></div>
+ <div class="solution"><var>ANSWER</var></div>
<div class="hints">
<div class="graphie" data-update="numbers">
REMOVE = label( [0, -2],
@@ -45,7 +46,7 @@
<div class="graphie" data-update="numbers">
style({
stroke: "#28AE7B",
- arrows: "-&gt;"
+ arrows: "->"
}, function(){
path( [ [ 1 + A - START, -3 ], [ 1 + ANSWER - START, -3] ] );
});
@@ -64,4 +65,5 @@
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
23 exercises/adding_subtracting_mixed_numbers_0.5.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math math-format"><head>
+<html data-require="math math-format">
+<head>
<title>Adding subtracting mixed numbers 0.5</title>
<script src="../khan-exercise.js"></script>
</head>
@@ -15,11 +16,11 @@
<var id="W1">randRange( 2, 19 )</var>
<var id="W2">( PM === 1 ? randRange( 1, 19 ) : randRange( -W1 + 1, -1 ))</var>
- <div data-ensure="getLCM( D1, D2 ) &lt; 61 &amp;&amp; D1 === D2">
+ <div data-ensure="getLCM( D1, D2 ) < 61 && D1 === D2">
<var id="D1">randRange( 3, 20 )</var>
<var id="D2">randRange( 3, 20 )</var>
</div>
- <div data-ensure="( PM === 1 ? (N1 / D1) + (N2 / D2) &lt; 1 : (N1 / D1) + PM * (N2 / D2) &gt; 0)">
+ <div data-ensure="( PM === 1 ? (N1 / D1) + (N2 / D2) < 1 : (N1 / D1) + PM * (N2 / D2) > 0)">
<var id="N1">randRange( 1, D1 - 1 )</var>
<var id="N2">randRange( 1, D2 - 1 )</var>
</div>
@@ -52,12 +53,12 @@
</div>
<div>
- <p><span data-if="PM === 1">Add</span><span data-else="">Subtract</span> the whole numbers:</p>
+ <p><span data-if="PM === 1">Add</span><span data-else>Subtract</span> the whole numbers:</p>
<p><code>=<var>W1 + W2</var> + \blue{<var>fraction( N1, D1 )</var>} <var>SIGN</var> \pink{<var>fraction( N2, D2 )</var>}</code></p>
</div>
<div>
- <p><span data-if="PM === 1">Add</span><span data-else="">Subtract</span> the fractions:</p>
+ <p><span data-if="PM === 1">Add</span><span data-else>Subtract</span> the fractions:</p>
<p><code>= <var>expr(["+", W1 + W2, fraction( N1 + PM * N2, D2 )])</var></code></p>
</div>
@@ -66,7 +67,7 @@
<p><code>= <var>W1 + W2 + fraction( SIMP_N1 * LCM / SIMP_D1 + PM * SIMP_N2 * LCM / SIMP_D2, LCM )</var></code></p>
</div>
- <div data-if="GCD &gt; 1">
+ <div data-if="GCD > 1">
<p>Simplify to lowest terms:</p>
<p><code>= <var>W1 + W2 + fractionReduce( SIMP_N1 * LCM / SIMP_D1 + PM * SIMP_N2 * LCM / SIMP_D2, LCM )</var></code></p>
</div>
@@ -109,23 +110,25 @@
<p><code>= \blue{<var>W1</var>} <var>SIGN</var> \pink{<var>abs( W2 )</var>} + \blue{<var>fraction( N1, D1 )</var>} <var>SIGN</var> \pink{<var>fraction( N2, D2 )</var>}</code></p>
</div>
<div>
- <p><span data-if="PM === 1">Add</span><span data-else="">Subtract</span> the whole numbers:</p>
+ <p><span data-if="PM === 1">Add</span><span data-else>Subtract</span> the whole numbers:</p>
<p><code>=<var>W1 + W2</var> + \blue{<var>fraction( N1, D1 )</var>} <var>SIGN</var> \pink{<var>fraction( N2, D2 )</var>}</code></p>
</div>
<div>
- <p><span data-if="PM === 1">Add</span><span data-else="">Subtract</span> the fractions:</p>
+ <p><span data-if="PM === 1">Add</span><span data-else>Subtract</span> the fractions:</p>
<p><code>= <var>expr(["+", W1 + W2, fraction( N1 + PM * N2, D2 )])</var></code></p>
</div>
<div>
<p>Combine the whole and fractional parts into a mixed number:</p>
<p><code>= <var>W1 + W2 + fraction( N1 - N2, D2)</var></code></p>
</div>
- <div data-if="GCD &gt; 1">
+ <div data-if="GCD > 1">
<p>Simplify to lowest terms:</p>
<p><code>= <var>W1 + W2 + fractionReduce( N1 - N2 , LCM )</var></code></p>
</div>
</div>
</div>
</div>
</div>
-</body></html>
+</div>
+</body>
+</html>
View
27 exercises/adding_subtracting_mixed_numbers_1.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math math-format"><head>
+<html data-require="math math-format">
+<head>
<title>Adding subtracting mixed numbers 1</title>
<script src="../khan-exercise.js"></script>
</head>
@@ -15,11 +16,11 @@
<var id="W1">randRange( 2, 19 )</var>
<var id="W2">( PM === 1 ? randRange( 1, 19 ) : randRange( -W1 + 1, -1 ))</var>
- <div data-ensure="getLCM( D1, D2 ) &lt; 61 &amp;&amp; D1 !== D2">
+ <div data-ensure="getLCM( D1, D2 ) < 61 && D1 !== D2">
<var id="D1">randRange( 3, 20 )</var>
<var id="D2">randRange( 3, 20 )</var>
</div>
- <div data-ensure="( PM === 1 ? (N1 / D1) + (N2 / D2) &lt; 1 : (N1 / D1) + PM * (N2 / D2) &gt; 0)">
+ <div data-ensure="( PM === 1 ? (N1 / D1) + (N2 / D2) < 1 : (N1 / D1) + PM * (N2 / D2) > 0)">
<var id="N1">randRange( 1, D1 - 1 )</var>
<var id="N2">randRange( 1, D2 - 1 )</var>
</div>
@@ -52,7 +53,7 @@
</div>
<div>
- <p><span data-if="PM === 1">Add</span><span data-else="">Subtract</span> the whole numbers:</p>
+ <p><span data-if="PM === 1">Add</span><span data-else>Subtract</span> the whole numbers:</p>
<p><code>=<var>W1 + W2</var> + \blue{<var>fraction( N1, D1 )</var>} <var>SIGN</var> \pink{<var>fraction( N2, D2 )</var>}</code></p>
</div>
@@ -67,7 +68,7 @@
</div>
<div>
- <p><span data-if="PM === 1">Add</span><span data-else="">Subtract</span> the fractions:</p>
+ <p><span data-if="PM === 1">Add</span><span data-else>Subtract</span> the fractions:</p>
<p><code>= <var>expr(["+", W1 + W2, fraction( SIMP_N1 * LCM / SIMP_D1 + PM * SIMP_N2 * LCM / SIMP_D2, LCM )])</var></code></p>
</div>
@@ -76,7 +77,7 @@
<p><code>= <var>W1 + W2 + fraction( SIMP_N1 * LCM / SIMP_D1 + PM * SIMP_N2 * LCM / SIMP_D2, LCM )</var></code></p>
</div>
- <div data-if="GCD &gt; 1">
+ <div data-if="GCD > 1">
<p>Simplify to lowest terms:</p>
<p><code>= <var>W1 + W2 + fractionReduce( SIMP_N1 * LCM / SIMP_D1 + PM * SIMP_N2 * LCM / SIMP_D2, LCM )</var></code></p>
</div>
@@ -89,11 +90,11 @@
<var id="SIGN">"-"</var>
<var id="W1">randRange( 2, 19 )</var>
<var id="W2">randRange( -W1 + 1, -1 )</var>
- <div data-ensure="getLCM( D1, D2 ) &lt; 61 &amp;&amp; D1 !== D2">
+ <div data-ensure="getLCM( D1, D2 ) < 61 && D1 !== D2">
<var id="D1">randRange( 3, 20 )</var>
<var id="D2">randRange( 3, 20 )</var>
</div>
- <div data-ensure="(N1 / D1) &lt; (N2 / D2)">
+ <div data-ensure="(N1 / D1) < (N2 / D2)">
<var id="N1">randRange( 1, D1 - 1 )</var>
<var id="N2">randRange( 1, D2 - 1 )</var>
</div>
@@ -134,23 +135,25 @@
<p><code>= \blue{<var>W1</var>} <var>SIGN</var> \pink{<var>abs( W2 )</var>} + \blue{<var>fraction( LCM + SIMP_N1 * LCM / SIMP_D1, LCM )</var>} <var>SIGN</var> \pink{<var>fraction( SIMP_N2 * LCM / SIMP_D2, LCM )</var>}</code></p>
</div>
<div>
- <p><span data-if="PM === 1">Add</span><span data-else="">Subtract</span> the whole numbers:</p>
+ <p><span data-if="PM === 1">Add</span><span data-else>Subtract</span> the whole numbers:</p>
<p><code>=<var>W1 + W2 </var> + \blue{<var>fraction( LCM + SIMP_N1 * LCM / SIMP_D1, LCM )</var>} <var>SIGN</var> \pink{<var>fraction( SIMP_N2 * LCM / SIMP_D2, LCM)</var>}</code></p>
</div>
<div>
- <p><span data-if="PM === 1">Add</span><span data-else="">Subtract</span> the fractions:</p>
+ <p><span data-if="PM === 1">Add</span><span data-else>Subtract</span> the fractions:</p>
<p><code>= <var>expr(["+", W1 + W2, fraction( (LCM + SIMP_N1 * LCM / SIMP_D1) + (PM * SIMP_N2 * LCM / SIMP_D2), LCM )])</var></code></p>
</div>
<div>
<p>Combine the whole and fractional parts into a mixed number:</p>
<p><code>= <var>W1 + W2 + fraction( (LCM + SIMP_N1 * LCM / SIMP_D1) + PM * SIMP_N2 * LCM / SIMP_D2, LCM )</var></code></p>
</div>
- <div data-if="GCD &gt; 1">
+ <div data-if="GCD > 1">
<p>Simplify to lowest terms:</p>
<p><code>= <var>W1 + W2 + fractionReduce( (LCM + SIMP_N1 * LCM / SIMP_D1) + PM * SIMP_N2 * LCM / SIMP_D2, LCM )</var></code></p>
</div>
</div>
</div>
</div>
</div>
-</body></html>
+</div>
+</body>
+</html>
View
26 exercises/adding_vectors.html
@@ -1,12 +1,13 @@
<!DOCTYPE html>
-<html data-require="math math-format graphie"><head>
+<html data-require="math math-format graphie">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding vectors</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
- <div class="vars" data-ensure="0 &lt; abs( AX + BX ) &amp;&amp; abs( AX + BX ) &lt; 10 &amp;&amp; 0 &lt; abs( AY + BY ) &amp;&amp; abs( AY + BY ) &lt; 10 &amp;&amp; (AX * AY) * (BX * BY) &lt; 0">
+ <div class="vars" data-ensure="0 < abs( AX + BX ) && abs( AX + BX ) < 10 && 0 < abs( AY + BY ) && abs( AY + BY ) < 10 && (AX * AY) * (BX * BY) < 0">
<var id="AX">randRangeNonZero( -9, 9 )</var>
<var id="AY">randRangeNonZero( -9, 9 )</var>
@@ -19,23 +20,23 @@
<p class="question">What is <code>\vec a + \vec b</code>?</p>
<p><code>\begin{align*}
- \vec a &amp;= <var>AX</var> \hat\imath + <var>AY</var> \hat\jmath \\
- \vec b &amp;= <var>BX</var> \hat\imath + <var>BY</var> \hat\jmath
+ \vec a &= <var>AX</var> \hat\imath + <var>AY</var> \hat\jmath \\
+ \vec b &= <var>BX</var> \hat\imath + <var>BY</var> \hat\jmath
\end{align*}</code></p>
- <div class="graphie" id="graph">
+ <div id="graph" class="graphie">
graphInit({
range: 10,
scale: 20,
tickStep: 1,
labelStep: 1,
unityLabels: false,
labelFormat: function( s ) { return "\\small{" + s + "}"; },
- axisArrows: "&lt;-&gt;"
+ axisArrows: "<->"
});
- line( [0, 0], [AX, AY], { stroke: "#6495ed", arrows: "-&gt;" } );
- line( [0, 0], [BX, BY], { stroke: "#28ae7b", arrows: "-&gt;" } );
+ line( [0, 0], [AX, AY], { stroke: "#6495ed", arrows: "->" } );
+ line( [0, 0], [BX, BY], { stroke: "#28ae7b", arrows: "->" } );
var AF = 1 + 0.8 / sqrt( AX * AX + AY * AY );
label( [AF * AX, AF * AY], "\\vec a", { color: "#6495ed" } );
@@ -45,7 +46,7 @@
</div>
<div class="solution" data-type="multiple">
- <p><span class="sol short40" data-fallback="1" data-forms="integer"><var>AX + BX</var></span> <code>\hat\imath + {}</code><span class="sol short40" data-fallback="1" data-forms="integer"><var>AY + BY</var></span> <code>\hat\jmath</code></p>
+ <p><span class="sol short40" data-forms="integer" data-fallback="1"><var>AX + BX</var></span> <code>\hat\imath + {}</code><span class="sol short40" data-forms="integer" data-fallback="1"><var>AY + BY</var></span> <code>\hat\jmath</code></p>
</div>
</div>
</div>
@@ -55,15 +56,16 @@
<div>
<p><code>\hat a + \hat b = (<var>AX</var> + <var>BX</var>) \hat\imath + (<var>AY</var> + <var>BY</var>) \hat\jmath</code></p>
<div class="graphie" data-update="graph">
- line( [BX, BY], [BX + AX, BY + AY], { stroke: "#6495ed", arrows: "-&gt;" } );
+ line( [BX, BY], [BX + AX, BY + AY], { stroke: "#6495ed", arrows: "->" } );
</div>
</div>
<div>
<p><code>\hphantom{\hat a + \hat b} = <var>AX + BX</var>\hat\imath + <var>AY + BY</var>\hat\jmath</code></p>
<div class="graphie" data-update="graph">
- line( [0, 0], [BX + AX, BY + AY], { stroke: "#ffa500", arrows: "-&gt;" } );
+ line( [0, 0], [BX + AX, BY + AY], { stroke: "#ffa500", arrows: "->" } );
</div>
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
8 exercises/addition_1.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math graphie graphie-helpers-arithmetic word-problems"><head>
+<html data-require="math graphie graphie-helpers-arithmetic word-problems">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>1-digit addition</title>
<script src="../khan-exercise.js"></script>
@@ -34,13 +35,12 @@
</div>
<p style="clear: left;">
<span data-if="isSingular(A)">There are 1 blue dot.</span><span data-else="">There are <var>A</var> blue dots.</span>
-
<span data-if="isSingular(B)">There are 1 green dot.</span><span data-else="">There are <var>B</var> green dots.</span>
-
<span>There are a total of <var>A + B</var> dots.</span>
</p>
</div>
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
12 exercises/addition_2.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math graphie graphie-helpers-arithmetic"><head>
+<html data-require="math graphie graphie-helpers-arithmetic">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>2-digit addition</title>
<script src="../khan-exercise.js"></script>
@@ -9,8 +10,8 @@
<div class="vars">
<var id="A_10">randRange( 1, 8 )*10</var>
<var id="A_1">randRange ( 0, 9 )*1</var>
- <var id="B_10" data-ensure="B_10+A_10&lt;100">randRange( 1, 8 )*10</var>
- <var id="B_1" data-ensure="B_1+A_1&lt;10">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>
@@ -28,9 +29,10 @@
</div>
</div>
<div class="hints">
- <div class="graphie" data-each="DUMMY as dummy" data-update="numbers">
+ <div class="graphie" data-update="numbers" data-each="DUMMY as dummy">
graph.adder.showHint();
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
14 exercises/addition_3.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
-<html data-require="math graphie graphie-helpers-arithmetic"><head>
+<html data-require="math graphie graphie-helpers-arithmetic">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Addition with carrying</title>
<script src="../khan-exercise.js"></script>
@@ -10,9 +11,9 @@
<var id="A_100">randRange( 1, 8 )*100</var>
<var id="A_10">randRange( 0, 7 )*10</var>
<var id="A_1">randRange ( 1, 9 )*1</var>
- <var id="B_100" data-ensure="B_100+A_100&lt;1000">randRange( 1, 8 )*100</var>
- <var id="B_10" data-ensure="B_10+A_10&lt;100">randRange( 0, 7 )*10</var>
- <var id="B_1" data-ensure="B_1+A_1&gt;=10">randRange ( 1, 9 )*1</var>
+ <var id="B_100" data-ensure="B_100+A_100<1000">randRange( 1, 8 )*100</var>
+ <var id="B_10" data-ensure="B_10+A_10<100">randRange( 0, 7 )*10</var>
+ <var id="B_1" data-ensure="B_1+A_1>=10">randRange ( 1, 9 )*1</var>
<var id="A">A_100+A_10+A_1</var>
<var id="B">B_100+B_10+B_1</var>
<var id="DUMMY">[]</var>
@@ -29,9 +30,10 @@
</div>
</div>
<div class="hints">
- <div class="graphie" data-each="DUMMY as dummy" data-update="numbers">
+ <div class="graphie" data-update="numbers" data-each="DUMMY as dummy">
graph.adder.showHint();
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
18 exercises/addition_4.html
@@ -1,20 +1,21 @@
<!DOCTYPE html>
-<html data-require="math graphie graphie-helpers-arithmetic"><head>
+<html data-require="math graphie graphie-helpers-arithmetic">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>4-digit addition with carrying</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
- <div class="vars" data-ensure="A &gt;= B &amp;&amp; (
- (A_1 + B_1 &gt; 10 &amp;&amp; B &gt;= 10) ||
- (A_10 + B_10 &gt; 100 &amp;&amp; B &gt;= 100) ||
- (A_100 + B_100 &gt; 1000 &amp;&amp; B &gt;= 1000))">
+ <div class="vars" data-ensure="A >= B && (
+ (A_1 + B_1 > 10 && B >= 10) ||
+ (A_10 + B_10 > 100 && B >= 100) ||
+ (A_100 + B_100 > 1000 && B >= 1000))">
<var id="A_1000">randRangeWeighted(0, 9, 0, 0.25) * 1000</var>
<var id="A_100">randRange(0, 9) * 100</var>
<var id="A_10">randRange(0, 9) * 10</var>
<var id="A_1">randRange(0, 9) * 1</var>
- <var id="B_1000" data-ensure="B_1000 &lt;= A_1000">
+ <var id="B_1000" data-ensure="B_1000 <= A_1000">
randRangeWeighted(0, 9, 0, 0.25) * 1000
</var>
<var id="B_100">randRange(0, 9) * 100</var>
@@ -37,9 +38,10 @@
</div>
<div class="hints">
- <div class="graphie" data-each="NUM_HINTS times" data-update="numbers">
+ <div class="graphie" data-update="numbers" data-each="NUM_HINTS times">
graph.adder.showHint();
</div>
</div>
</div>
-</body></html>
+</body>
+</html>
View
23 exercises/age_word_problems.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
+<!DOCTYPE html>
<html data-require="math math-format word-problems spin"><head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Age word problems</title>
<script src="../khan-exercise.js"></script>
</head>
@@ -36,7 +37,7 @@
</div>
</div>
- <div id="solve-younger-1" data-type="solve-older-1">
+ <div data-type="solve-older-1" id="solve-younger-1">
<div class="question">
<p><var>person(1)</var> is <var>A</var> years older than
<var>person(2)</var>. <var>Cardinal(B)</var> years ago, <var>person(1)</var>
@@ -84,7 +85,7 @@
</div>
</div>
- <div id="solve-younger-2" data-type="solve-older-2">
+ <div data-type="solve-older-2" id="solve-younger-2">
<div class="question">
<p><var>person(1)</var> is <var>C</var> times as old as
<var>person(2)</var> and is also <var>A</var>
@@ -106,7 +107,7 @@
</div>
<div id="solve-older-3">
- <div class="vars" data-ensure="C - A !== A &amp;&amp; A * B * (C - 1) &lt; 100 * (C - A)">
+ <div data-ensure="C - A !== A &amp;&amp; A * B * (C - 1) &lt; 100 * (C - A)" class="vars">
<var id="A">randRange(2, 5)</var>
<var id="C">randRange(A + 2, 9)</var>
<var id="B">randRange(2, 7) * (C - A)</var>
@@ -130,7 +131,7 @@
</div>