# Khan/khan-exercises

Manually i18nize all of the minor exercises

Summary:
Manually make modifications to all the exercises for i18n. Most of the problems revolved around:

- Wrapping Strings in variables or graphies with $._ - data-ifs in the middle of sentences, that needed to be pulled out around the entire sentence - Strings that needed to be put into Plural objects for pluralization - Decoupling strings from logic Test Plan: Visit the changed exercises. Make sure the question renders correctly and there are no javascript errors. Take all the hints and make sure nothing is rendered incorrectly. Do the translations into box language, and make sure that everything from the languages is boxy. Reviewers: csilvers, john Reviewed By: csilvers CC: alpert, eater Differential Revision: http://phabricator.khanacademy.org/D2504 • Loading branch information... 1 parent 9b11aaf commit de19411ac1af929535be3331edab550051cc4f24 xymostech committed Jun 3, 2013 Showing with 1,186 additions and 562 deletions. 1. +2 −2 exercises/adding_and_subtracting_decimals_word_problems.html 2. +40 −20 exercises/area_1.html 3. +19 −7 exercises/area_of_parallelograms.html 4. +40 −22 exercises/area_of_squares_and_rectangles.html 5. +24 −14 exercises/area_of_triangles_1.html 6. +22 −8 exercises/areas_of_trapezoids_rhombi_and_kites.html 7. +4 −4 exercises/arithmetic_word_problems_1.html 8. +7 −7 exercises/arithmetic_word_problems_2.html 9. +4 −4 exercises/average_word_problems.html 10. +4 −3 exercises/axis_of_symmetry.html 11. +5 −5 exercises/coin_flip_sequences.html 12. +35 −16 exercises/combinations_1.html 13. +20 −8 exercises/comparing_improper_fractions_and_mixed_numbers.html 14. +3 −3 exercises/completing_the_square_2.html 15. +21 −14 exercises/congruency_postulates.html 16. +6 −5 exercises/congruent_segments.html 17. +8 −7 exercises/congruent_triangles_1.html 18. +56 −9 exercises/counting_1.html 19. +76 −35 exercises/creating_bar_charts_1.html 20. +66 −24 exercises/defined_and_undefined_matrix_operations.html 21. +24 −7 exercises/dice_probability.html 22. +13 −8 exercises/direct_and_inverse_variation.html 23. +13 −9 exercises/exploring_mean_and_median.html 24. +7 −4 exercises/exponents_1.html 25. +24 −11 exercises/graphing_points_2.html 26. +1 −1 exercises/graphs_of_sine_and_cosine.html 27. +1 −1 exercises/greatest_common_divisor_alternative.html 28. +3 −3 exercises/herons_formula.html 29. +13 −7 exercises/integer_sums.html 30. +16 −8 exercises/limiting_reagent_stoichiometry.html 31. +43 −37 exercises/line_graph_intuition.html 32. +17 −6 exercises/multiplication_0.5.html 33. +17 −6 exercises/multiplication_1.html 34. +7 −7 exercises/number_properties_terminology_1.html 35. +25 −15 exercises/perimeter_1.html 36. +23 −13 exercises/perimeter_of_squares_and_rectangles.html 37. +11 −8 exercises/plotting_the_line_of_best_fit.html 38. +40 −34 exercises/points_lines_and_planes.html 39. +1 −1 exercises/probability_with_perm_comb.html 40. +8 −8 exercises/pythagorean_identities.html 41. +3 −2 exercises/radical_equations.html 42. +2 −1 exercises/reading_bar_charts_1.html 43. +13 −6 exercises/reading_bar_charts_2.html 44. +23 −15 exercises/reading_bar_charts_3.html 45. +10 −2 exercises/reading_line_charts_1.html 46. +14 −4 exercises/reading_pictographs_1.html 47. +18 −8 exercises/reading_pictographs_2.html 48. +74 −13 exercises/reading_tables_1.html 49. +18 −4 exercises/rotation_of_polygons.html 50. +5 −3 exercises/shaded_areas.html 51. +25 −9 exercises/similar_triangles_1.html 52. +15 −8 exercises/similar_triangles_2.html 53. +9 −5 exercises/slope_of_a_line.html 54. +5 −2 exercises/standard_deviation.html 55. +64 −12 exercises/systems_of_equations_word_problems.html 56. +6 −2 exercises/telling_time_0.5.html 57. +43 −17 exercises/telling_time_2.html 58. +4 −2 exercises/the_complex_plane.html 59. +5 −3 exercises/triangle_inequality_theorem.html 60. +6 −3 exercises/triangle_types.html 61. +6 −6 exercises/trigonometry_1.5.html 62. +6 −6 exercises/trigonometry_2.html 63. +19 −3 exercises/understanding_moving_the_decimal.html 64. +2 −2 exercises/unit_circle.html 65. +13 −10 exercises/variance.html 66. +1 −1 exercises/views_of_a_function.html 67. +5 −2 utils/qhints.js 68. +3 −0 utils/word-problems.js 4 exercises/adding_and_subtracting_decimals_word_problems.html  @@ -229,7 +229,7 @@ - {To get to school each morning|To get to work each morning|To visit his grandmother}, person(1) takes a vehicle(1) distance_1 plural_form(distance(1)) and a vehicle(2) distance_2 plural_form(distance(1)). {In total, the journey takes time_1 minutes.|} {To get to school each morning|To get to work each morning|To visit her grandmother}, person(1) takes a vehicle(1) distance_1 plural_form(distance(1)) and a vehicle(2) distance_2 plural_form(distance(1)). {In total, the journey takes time_1 minutes.|} + {To get to school each morning|To get to work each morning|To visit his grandmother}, person(1) takes a vehicle(1) distance_1 plural_form(distance(1), distance_1) and a vehicle(2) distance_2 plural_form(distance(1), distance_2). {In total, the journey takes time_1 minutes.|} {To get to school each morning|To get to work each morning|To visit her grandmother}, person(1) takes a vehicle(1) distance_1 plural_form(distance(1), distance_1) and a vehicle(2) distance_2 plural_form(distance(1), distance_2). {In total, the journey takes time_1 minutes.|} How many plural_form(distance(1)) is person(1)'s journey in total? @@ -251,7 +251,7 @@ graph.adder.showHint(); - person(1) travels solution plural_form(distance(1)) in total. + person(1) travels solution plural_form(distance(1), solution) in total. 60 exercises/area_1.html  @@ -9,11 +9,21 @@ randFromArray([ - ["in", "inch"], - ["ft", "foot"], - ["m", "meter"], - ["cm", "centimeter"], - ["", "unit"] + ["in", new Plural(function(num) { + return$.ngettext("inch", "inches", num); + })], + ["ft", new Plural(function(num) { + return $.ngettext("foot", "feet", num); + })], + ["m", new Plural(function(num) { + return$.ngettext("meter", "meters", num); + })], + ["cm", new Plural(function(num) { + return $.ngettext("centimeter", "centimeters", num); + })], + ["", new Plural(function(num) { + return$.ngettext("unit", "units", num); + })] ])
@@ -37,7 +47,7 @@
S * S - square AMBIGUOUS_PLURAL(UNIT_TEXT) + square plural_form(UNIT_TEXT)
@@ -61,12 +71,12 @@ The length is S UNIT_TEXT and the width is S UNIT_TEXT, so the area is S\timesS - square AMBIGUOUS_PLURAL(UNIT_TEXT). + square plural_form(UNIT_TEXT, S * S).

- The length is S AMBIGUOUS_PLURAL(UNIT_TEXT, S) and - the width is S AMBIGUOUS_PLURAL(UNIT_TEXT, S), so the + The length is S plural_form(UNIT_TEXT, S) and + the width is S plural_form(UNIT_TEXT, S), so the area is S\timesS - square AMBIGUOUS_PLURAL(UNIT_TEXT). + square plural_form(UNIT_TEXT, S * S).

@@ -76,7 +86,7 @@

We can also count S * S - square AMBIGUOUS_PLURAL(UNIT_TEXT). + square plural_form(UNIT_TEXT, S * S).

_(S * S).times(function(n) { @@ -111,7 +121,7 @@
L * W - square AMBIGUOUS_PLURAL(UNIT_TEXT) + square plural_form(UNIT_TEXT)
@@ -134,11 +144,21 @@ });

- The length is L UNIT_TEXT.The length is L AMBIGUOUS_PLURAL(UNIT_TEXT, L). - The width is W UNIT_TEXT.The width is W AMBIGUOUS_PLURAL(UNIT_TEXT, W). - Thus the - area is L\timesW - square AMBIGUOUS_PLURAL(UNIT_TEXT). + + The length is L UNIT_TEXT. + + The length is L plural_form(UNIT_TEXT, L) + . + + The width is W UNIT_TEXT. + + The width is W plural_form(UNIT_TEXT, W). + + + Thus the area is + L\timesW + square plural_form(UNIT_TEXT, L * W). +

@@ -148,7 +168,7 @@

We can also count L * W - square AMBIGUOUS_PLURAL(UNIT_TEXT). + square plural_form(UNIT_TEXT, L * W).

_(L * W).times(function(n) { @@ -201,7 +221,7 @@
SHAPE.area - square AMBIGUOUS_PLURAL(UNIT_TEXT) + square plural_form(UNIT_TEXT)
@@ -217,7 +237,7 @@

The area is SHAPE.area square - AMBIGUOUS_PLURAL(UNIT_TEXT). + plural_form(UNIT_TEXT, SHAPE.area).

26 exercises/area_of_parallelograms.html
 @@ -74,11 +74,21 @@
randFromArray([ - ["in", "inch"], - ["ft", "foot"], - ["m", "meter"], - ["cm", "centimeter"], - ["", "unit"] + ["in", new Plural(function(num) { + return $.ngettext("inch", "inches", num); + })], + ["ft", new Plural(function(num) { + return$.ngettext("foot", "feet", num); + })], + ["m", new Plural(function(num) { + return $.ngettext("meter", "meters", num); + })], + ["cm", new Plural(function(num) { + return$.ngettext("centimeter", "centimeters", num); + })], + ["", new Plural(function(num) { + return $.ngettext("unit", "units", num); + })] ]) randRange(1, 8) @@ -96,7 +106,7 @@ K - square AMBIGUOUS_PLURAL(UNIT_TEXT) + square plural_form(UNIT_TEXT) @@ -107,7 +117,9 @@ graph.p.drawHeight(); - By moving a slice of the parallelogram, we can see that its area is equal to that of a rectangle with the same base and height. + By moving a slice of the parallelogram, we can see + that its area is equal to that of a rectangle with the + same base and height. graph.p.sliceHint(); graph.p.animHint(); 62 exercises/area_of_squares_and_rectangles.html  @@ -9,11 +9,21 @@ randFromArray([ - ["in", "inch"], - ["ft", "foot"], - ["m", "meter"], - ["cm", "centimeter"], - ["", "unit"] + ["in", new Plural(function(num) { + return$.ngettext("inch", "inches", num); + })], + ["ft", new Plural(function(num) { + return $.ngettext("foot", "feet", num); + })], + ["m", new Plural(function(num) { + return$.ngettext("meter", "meters", num); + })], + ["cm", new Plural(function(num) { + return $.ngettext("centimeter", "centimeters", num); + })], + ["", new Plural(function(num) { + return$.ngettext("unit", "units", num); + })] ])
@@ -27,12 +37,12 @@ UNIT_TEXT long. What is its area? One side of a square is S - AMBIGUOUS_PLURAL(UNIT_TEXT, S) long. What is its area? + plural_form(UNIT_TEXT, S) long. What is its area?

S * S square - AMBIGUOUS_PLURAL(UNIT_TEXT) + plural_form(UNIT_TEXT)
@@ -63,12 +73,12 @@ The length is S UNIT_TEXT and the width is S UNIT_TEXT, so the area is S\timesS - square AMBIGUOUS_PLURAL(UNIT_TEXT). + square plural_form(UNIT_TEXT, S * S).

- The length is S AMBIGUOUS_PLURAL(UNIT_TEXT, S) and - the width is S AMBIGUOUS_PLURAL(UNIT_TEXT, S), so the + The length is S plural_form(UNIT_TEXT, S) and + the width is S plural_form(UNIT_TEXT, S), so the area is S\timesS - square AMBIGUOUS_PLURAL(UNIT_TEXT). + square plural_form(UNIT_TEXT, S * S).

@@ -78,7 +88,7 @@

We can also count S * S - square AMBIGUOUS_PLURAL(UNIT_TEXT). + square plural_form(UNIT_TEXT, S * S).

_(S * S).times(function(n) { @@ -98,12 +108,12 @@

The area of a square is S * S - square AMBIGUOUS_PLURAL(UNIT_TEXT). How long is each side? + square plural_form(UNIT_TEXT, S * S). How long is each side?

S - plural(UNIT_TEXT) + plural_form(UNIT_TEXT)
@@ -146,7 +156,7 @@

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

@@ -162,18 +172,18 @@ A rectangle is L UNIT_TEXT long.A rectangle is - L AMBIGUOUS_PLURAL(UNIT_TEXT, L) + L plural_form(UNIT_TEXT, L) long. The rectangle is also W UNIT_TEXT wide. What is its area?The rectangle is also - W AMBIGUOUS_PLURAL(UNIT_TEXT, W) + W plural_form(UNIT_TEXT, W) wide. What is its area?

L * W square - AMBIGUOUS_PLURAL(UNIT_TEXT) + plural_form(UNIT_TEXT)
@@ -203,11 +213,19 @@ });

- The length is L UNIT_TEXT.The length is L AMBIGUOUS_PLURAL(UNIT_TEXT, L). - The width is W UNIT_TEXT.The width is W AMBIGUOUS_PLURAL(UNIT_TEXT, W). + + The length is L UNIT_TEXT. + + The length is L plural_form(UNIT_TEXT, L). + + + The width is W UNIT_TEXT. + + The width is W plural_form(UNIT_TEXT, W). + Thus the area is L\timesW - square AMBIGUOUS_PLURAL(UNIT_TEXT). + square plural_form(UNIT_TEXT, L * W).

@@ -217,7 +235,7 @@

We can also count L * W - square AMBIGUOUS_PLURAL(UNIT_TEXT). + square plural_form(UNIT_TEXT, L * W).

_(L * W).times(function(n) {
38 exercises/area_of_triangles_1.html
 @@ -9,11 +9,21 @@
randFromArray([ - ["in", "inch"], - ["ft", "foot"], - ["m", "meter"], - ["cm", "centimeter"], - ["", "unit"] + ["in", new Plural(function(num) { + return $.ngettext("inch", "inches", num); + })], + ["ft", new Plural(function(num) { + return$.ngettext("foot", "feet", num); + })], + ["m", new Plural(function(num) { + return $.ngettext("meter", "meters", num); + })], + ["cm", new Plural(function(num) { + return$.ngettext("centimeter", "centimeters", num); + })], + ["", new Plural(function(num) { + return $.ngettext("unit", "units", num); + })] ]) @@ -45,7 +55,7 @@ (B * H) / 2 - square AMBIGUOUS_PLURAL(UNIT_TEXT) + square plural_form(UNIT_TEXT) @@ -67,10 +77,10 @@ The base of the triangle is B UNIT_TEXT.The base of the triangle is - B AMBIGUOUS_PLURAL(UNIT_TEXT, B). + B plural_form(UNIT_TEXT, B). The height of the triangle is H UNIT_TEXT.The height of the triangle is - H AMBIGUOUS_PLURAL(UNIT_TEXT, H). + H plural_form(UNIT_TEXT, H). Thus the area of the rectangle shown above is B \times H. @@ -123,7 +133,7 @@ (B * H) / 2 - square AMBIGUOUS_PLURAL(UNIT_TEXT) + square plural_form(UNIT_TEXT) @@ -155,10 +165,10 @@ The base of the triangle is B UNIT_TEXT.The base of the triangle is - B AMBIGUOUS_PLURAL(UNIT_TEXT, B). + B plural_form(UNIT_TEXT, B). The height of the triangle is H UNIT_TEXT.The height of the triangle is - H AMBIGUOUS_PLURAL(UNIT_TEXT, H). + H plural_form(UNIT_TEXT, H). Thus the area of the rectangle shown above is B \times H. @@ -267,7 +277,7 @@ (B * H) / 2 - square AMBIGUOUS_PLURAL(UNIT_TEXT) + square plural_form(UNIT_TEXT) @@ -280,10 +290,10 @@ The base of the triangle is B UNIT_TEXT.The base of the triangle is - B AMBIGUOUS_PLURAL(UNIT_TEXT, B). + B plural_form(UNIT_TEXT, B). The height of the triangle is H UNIT_TEXT.The height of the triangle is - H AMBIGUOUS_PLURAL(UNIT_TEXT, H). + H plural_form(UNIT_TEXT, H). \text{$._("area")} = \frac{1}{2} \times B \times

30 exercises/areas_of_trapezoids_rhombi_and_kites.html
 @@ -9,11 +9,21 @@
randFromArray([ - ["in", "inch"], - ["ft", "foot"], - ["m", "meter"], - ["cm", "centimeter"], - ["", "unit"] + ["in", new Plural(function(num) { + return $.ngettext("inch", "inches", num); + })], + ["ft", new Plural(function(num) { + return$.ngettext("foot", "feet", num); + })], + ["m", new Plural(function(num) { + return $.ngettext("meter", "meters", num); + })], + ["cm", new Plural(function(num) { + return$.ngettext("centimeter", "centimeters", num); + })], + ["", new Plural(function(num) { + return $.ngettext("unit", "units", num); + })] ]) @@ -58,7 +68,7 @@ K - square AMBIGUOUS_PLURAL(UNIT_TEXT) + square plural_form(UNIT_TEXT) @@ -190,7 +200,7 @@ K - square AMBIGUOUS_PLURAL(UNIT_TEXT) + square plural_form(UNIT_TEXT) @@ -204,7 +214,11 @@ [Show me why] - The horizontalvertical diagonal in the center splits the kite into two congruent triangles. + + The horizontal diagonal in the center splits the kite into two congruent triangles. + + The vertical diagonal in the center splits the kite into two congruent triangles. + var showSubHint = function() { graph.subhint.show(); 8 exercises/arithmetic_word_problems_1.html  @@ -284,9 +284,9 @@ The sum is NUM2 + NUM1 plural_form(exercise(1), TOTAL). - He did NUM2 + NUM1 = TOTAL plural_form(exercise(1)). + He did NUM2 + NUM1 = TOTAL plural_form(exercise(1), TOTAL). - She did NUM2 + NUM1 = TOTAL plural_form(exercise(1)). + She did NUM2 + NUM1 = TOTAL plural_form(exercise(1), TOTAL). @@ -307,10 +307,10 @@ How many exercise(1) did person(2) do? - How many plural_form(exercise(1), 2) did person(2) do? + How many plural_form(exercise(1)) did person(2) do? - NUM2 plural(exercise(1), 2) + NUM2 plural(exercise(1)) 14 exercises/arithmetic_word_problems_2.html  @@ -124,7 +124,7 @@ and the number of days that person(1) went biking(1). - The product is NUM1\text{$._("%(distance_unit)s per day", {distance_unit: plural_form(distance( 1 ))})} \times NUM2\text{ $._("days")}. + The product is NUM1\text{$._("%(distance_unit)s per day", {distance_unit: plural_form(distance( 1, NUM1 ))})} \times NUM2\text{ $._("days")}. NUM1\text{$._("%(distance_unit)s per day", {distance_unit: plural( distance( 1 ) )})} \times NUM2\text{ $._("days")}= TOTAL\text{ plural( distance(1) )} @@ -162,12 +162,12 @@ by the number of days that person(1) went biking(1). - We are looking for the quotient, which is TOTAL\text{ plural_form(distance( 1 ))} \div NUM2\text{$._("days")}. + We are looking for the quotient, which is TOTAL\text{ plural_form(distance( 1, TOTAL ))} \div NUM2\text{ $._("days")}. TOTAL\text{ plural( distance( 1 ) )} \div NUM2\text{$._("days")} = NUM1 \text{ $._("%(distance_unit)s per day", {distance_unit: plural( distance(1) )})} - person( 1 ) biked( 1 ) NUM1 plural_form(distance(1)) each day. + person( 1 ) biked( 1 ) NUM1 plural_form(distance(1), NUM) each day. @@ -268,10 +268,10 @@ divided by the number of rows. - The result, called the quotient, is TOTAL\text{ plural_form(crop( 1 ))} \div NUM1\text{$._("rows of %(crop)s", {crop: plural_form(crop( 1 ))})}. + The result, called the quotient, is TOTAL\text{ plural_form(crop( 1 ), TOTAL)} \div NUM1\text{ $._("rows of %(crop)s", {crop: plural_form(crop( 1 ))})}. - TOTAL\text{ plural( crop( 1 ) )} \div NUM1\text{$._("rows of %(crop)s", {plural__crop__1____: plural( crop( 1 ) )})} = NUM2\text{ $._("%(crop)s per row", {crop: plural( crop(1) )})} + TOTAL\text{ plural( crop( 1 ) )} \div NUM1\text{$._("rows of %(crop)s", {crop: plural( crop( 1 ) )})} = NUM2\text{ $._("%(crop)s per row", {crop: plural( crop(1) )})} @@ -303,10 +303,10 @@ divided by the number of plural_form(crop(1)) in each row. - The result, called the quotient, is TOTAL\text{ plural_form(crop( 1 ))} \div NUM1\text{$._("%(crop)s per row", {crop: plural_form(crop(1))})}. + The result, called the quotient, is TOTAL\text{ plural_form(crop( 1 ), TOTAL)} \div NUM1\text{ $._("%(crop)s per row", {crop: plural_form(crop(1))})}. - TOTAL\text{ plural( crop( 1 ) )} \div NUM1\text{$._("%(crop)s per row", {crop: plural( crop(1) )})} = NUM2\text{ plural( 'row' )} + TOTAL\text{ plural( crop( 1 ) )} \div NUM1\text{ $._("%(crop)s per row", {crop: plural( crop(1) )})} = NUM2\text{ rows} 8 exercises/average_word_problems.html  @@ -24,7 +24,7 @@ - In his course(1) class, person(1) took LENGTH plural_form(exam(1)). His scores were toSentence(SCORES). In her course(1) class, person(1) took LENGTH plural_form(exam(1)). Her scores were toSentence(SCORES). + In his course(1) class, person(1) took LENGTH plural_form(exam(1), LENGTH). His scores were toSentence(SCORES). In her course(1) class, person(1) took LENGTH plural_form(exam(1), LENGTH). Her scores were toSentence(SCORES). What was his average score on the plural_form(exam(1))? What was her average score on the plural_form(exam(1))? @@ -45,7 +45,7 @@ - On the first COUNT plural_form(exam(1)) of his course(1) class, person(1) got an average score of OLD_AVG. On the first COUNT plural_form(exam(1)) of her course(1) class, person(1) got an average score of OLD_AVG. + On the first COUNT plural_form(exam(1), COUNT) of his course(1) class, person(1) got an average score of OLD_AVG. On the first COUNT plural_form(exam(1), COUNT) of her course(1) class, person(1) got an average score of OLD_AVG. What does he need on the next exam(1) to have an overall average of NEW_AVG? What does she need on the next exam(1) to have an overall average of NEW_AVG? @@ -68,9 +68,9 @@ - person(1) has taken COUNT plural_form(exam(1)) and his average score so far is OLD_AVG. person(1) has taken COUNT plural_form(exam(1)) and her average score so far is OLD_AVG. + person(1) has taken COUNT plural_form(exam(1), COUNT) and his average score so far is OLD_AVG. person(1) has taken COUNT plural_form(exam(1), COUNT) and her average score so far is OLD_AVG. - If he gets 100, a perfect score, on the remaining REMAINING plural_form(exam(1)), what will his new average be? If she gets 100, a perfect score, on the remaining REMAINING plural_form(exam(1)), what will her new average be? + If he gets 100, a perfect score, on the remaining REMAINING plural_form(exam(1), REMAINING), what will his new average be? If she gets 100, a perfect score, on the remaining REMAINING plural_form(exam(1), REMAINING), what will her new average be? NEW_AVG 7 exercises/axis_of_symmetry.html  @@ -11,7 +11,8 @@ randRange( 0, 1 ) randRange( 3, 8 ) randRange( 0, SIDES - 1 ) - SYM ? "Yes" : "No" + [$._("Yes"), $._("No")] + SYM ? YES : NO @@ -31,8 +32,8 @@ ANSWER - • Yes • - • No • + • YES • + • NO Does the blue line split the shape into two parts which look like reflections of each other? 10 exercises/coin_flip_sequences.html  @@ -88,9 +88,9 @@ return (SEQUENCE.match(RegExp("(?=" + result + ")", "g")) || []).length }) [ - 'Fair coin', - 'Unfair coin', - 'Human guesses' +$._("Fair coin"), + $._("Unfair coin"), +$._("Human guesses") ] @@ -143,7 +143,7 @@ range: [[0, 16], [0, 6]], scale: [31, 54] }); - label([8, 6], "Two-flip streaks", "below", false).css({ + label([8, 6], $._("Two-flip streaks"), "below", false).css({ "font-size": "16px", "color": "#444444" }); @@ -175,7 +175,7 @@ range: [[0, 16], [0, 6]], scale: [31, 54] }); - label([8, 6], "Three-flip streaks", "below", false).css({ + label([8, 6],$._("Three-flip streaks"), "below", false).css({ "font-size": "16px", "color": "#444444" });
51 exercises/combinations_1.html
 @@ -9,50 +9,69 @@
-
- randFromArray(["shirts", "tigers", "books", "Fabergé eggs", "socks", "action figures"]) +
+ randFromArray([ + new Plural(function(num) { + return $.ngettext("shirt", "shirts", num); + }), + new Plural(function(num) { + return$.ngettext("tiger", "tigers", num); + }), + new Plural(function(num) { + return $.ngettext("book", "books", num); + }), + new Plural(function(num) { + return$.ngettext("Fabergé egg", "Fabergé eggs", num); + }), + new Plural(function(num) { + return $.ngettext("sock", "socks", num); + }), + new Plural(function(num) { + return$.ngettext("action figure", "action figures", num); + }) + ]) randRange(5,9) randRange(3,5) factorial(NUM_THINGS) / (factorial(NUM_THINGS-NUM_TAKEN) * factorial(NUM_TAKEN))

- person(1) is packing his bags for his vacation. He has - NUM_THINGS unique THING, but only NUM_TAKEN fit in his bag. + person(1) is packing his bags for his vacation. He has + NUM_THINGS unique plural_form(THING, NUM_THINGS), but only NUM_TAKEN fit in his bag.

person(1) is packing her bags for her vacation. She has - NUM_THINGS unique THING, but only NUM_TAKEN fit in her bag. + NUM_THINGS unique plural_form(THING, NUM_THINGS), but only NUM_TAKEN fit in her bag.

-

How many different groups of NUM_TAKEN THING can he take?

How many different groups of NUM_TAKEN THING can she take?

+

How many different groups of NUM_TAKEN plural_form(THING, NUM_TAKEN) can he take?

How many different groups of NUM_TAKEN plural_form(THING, NUM_TAKEN) can she take?

- person(1) has NUM_TAKEN spaces for his THING, + person(1) has NUM_TAKEN spaces for his plural_form(THING), so let's fill them one by one. At first, person(1) has NUM_THINGS choices for what to put in the first space.

- person(1) has NUM_TAKEN spaces for her THING, + person(1) has NUM_TAKEN spaces for her plural_form(THING), so let's fill them one by one. At first, person(1) has NUM_THINGS choices for what to put in the first space.

- For the second space, he only has NUM_THINGS-1 THING left, so there are only + For the second space, he only has NUM_THINGS-1 plural_form(THING, NUM_THINGS-1) left, so there are only NUM_THINGS-1 choices of what to put in the second space. So far, it seems like there are NUM_THINGS \cdot NUM_THINGS-1 = NUM_THINGS * (NUM_THINGS-1) different unique choices person(1) could have made to fill the first two spaces in his bag. But that's not quite right.

- For the second space, she only has NUM_THINGS-1 THING left, so there are only + For the second space, she only has NUM_THINGS-1 plural_form(THING, NUM_THINGS-1) left, so there are only NUM_THINGS-1 choices of what to put in the second space. So far, it seems like there are NUM_THINGS \cdot NUM_THINGS-1 = NUM_THINGS * (NUM_THINGS-1) different unique choices person(1) could have made to fill the first two spaces in her bag. But that's not quite right.

- Why? Because if he picked THING.substring(0,THING.length-1) number 3, then - THING.substring(0,THING.length-1) number 1, that's the same situation as picking number 1 and then number 3. They both end up in the same bag. + Why? Because if he picked THING number 3, then + THING number 1, that's the same situation as picking number 1 and then number 3. They both end up in the same bag.

- Why? Because if she picked THING.substring(0,THING.length-1) number 3, then - THING.substring(0,THING.length-1) number 1, that's the same situation as picking number 1 and then number 3. They both end up in the same bag. + Why? Because if she picked THING number 3, then + THING number 1, that's the same situation as picking number 1 and then number 3. They both end up in the same bag.

So, if person(1) keeps filling the spaces in his bag, making _.map(_.range(NUM_TAKEN), function(l){ return (NUM_THINGS - l);}).join("\\cdot") = \dfrac{NUM_THINGS!}{(NUM_THINGS-NUM_TAKEN)!} = factorial(NUM_THINGS)/factorial(NUM_THINGS-NUM_TAKEN) decisions altogether, we've overcounted a bunch of groups. @@ -67,15 +86,15 @@

There are NUM_TAKEN! = factorial(NUM_TAKEN) ways of ordering NUM_TAKEN - things, so we've counted each group of NUM_TAKEN THING + things, so we've counted each group of NUM_TAKEN plural_form(THING, NUM_TAKEN) factorial(NUM_TAKEN) times.

So, we have to divide the number of ways we could have filled the bag in order by number of times we've overcounted our groups.

\dfrac{NUM_THINGS!}{(NUM_THINGS - NUM_TAKEN)!} \cdot \dfrac{1}{NUM_TAKEN!} is the number - of groups of THING person(1) can bring. + of groups of plural_form(THING) person(1) can bring.
Another way to write this is \binom{NUM_THINGS}{NUM_TAKEN} , or NUM_THINGS choose NUM_TAKEN, which is ANSWER.

28 exercises/comparing_improper_fractions_and_mixed_numbers.html
 @@ -31,8 +31,6 @@ getLCM( M_DENOM_REDUCED, I_DENOM ) LCM / M_DENOM_REDUCED LCM / I_DENOM - F1 === 1 ? "remains as" : "becomes" - F2 === 1 ? "remains as" : "becomes" M_DENOM_REDUCED*WHOLE+M_NUM_REDUCED (function() { @@ -72,8 +70,16 @@

Their smallest common denominator is the LCM of M_DENOM_REDUCED and I_DENOM.

\lcm(M_DENOM_REDUCED, I_DENOM) = LCM

-

The first fraction BECOMES_1 \dfrac{M_AS_I * F1}{LCM}.

-

The second fraction BECOMES_2 \dfrac{I_NUM * F2}{LCM}.

+

+ The first fraction remains as \dfrac{M_AS_I * F1}{LCM}. +

+ The first fraction becomes \dfrac{M_AS_I * F1}{LCM}. +

+

+ The second fraction remains as \dfrac{I_NUM * F2}{LCM}. +

+ The second fraction becomes \dfrac{I_NUM * F2}{LCM}. +

We see that \dfrac{M_AS_I * F1}{LCM} SOLUTION \dfrac{I_NUM * F2}{LCM}.

@@ -101,8 +107,6 @@ getLCM( M_DENOM_REDUCED, I_DENOM ) LCM / M_DENOM_REDUCED LCM / I_DENOM - F1 === 1 ? "remains as" : "becomes" - F2 === 1 ? "remains as" : "becomes" M_DENOM_REDUCED*WHOLE+M_NUM_REDUCED (function() { @@ -142,8 +146,16 @@

Their smallest common denominator is the LCM of M_DENOM_REDUCED and I_DENOM.

\lcm(M_DENOM_REDUCED, I_DENOM) = LCM

-

The first fraction BECOMES_1 \dfrac{M_AS_I * F1}{LCM}.

-

The second fraction BECOMES_2 \dfrac{I_NUM * F2}{LCM}.

+

+ The first fraction remains as \dfrac{M_AS_I * F1}{LCM}. +

+ The first fraction becomes \dfrac{M_AS_I * F1}{LCM}. +

+

+ The second fraction remains as \dfrac{I_NUM * F2}{LCM}. +

+ The second fraction becomes \dfrac{I_NUM * F2}{LCM}. +

We see that \dfrac{M_AS_I * F1}{LCM} SOLUTION \dfrac{I_NUM * F2}{LCM}.

6 exercises/completing_the_square_2.html
 @@ -25,7 +25,7 @@
X1
X2
-

x = {}\quad \text{$._("or")} \quad x = {} + x = {}\text{$._("or") } x = {}

integers, like 6

simplified proper fractions, like 3/5

@@ -86,10 +86,10 @@

Isolate x to find the solution(s).

x = decimalFraction( -B / 2, 1, 1 )\pmdecimalFraction( sqrt( C * -1 + pow( B / 2, 2 ) ), 1, 1 )

-

x = decimalFraction( -B / 2 + sqrt( C * -1 + pow( B / 2, 2 ) ), 1, 1 ) \text{ or } x = decimalFraction( -B / 2 - sqrt( C * -1 + pow( B / 2, 2 ) ), 1, 1 )

+

x = decimalFraction( -B / 2 + sqrt( C * -1 + pow( B / 2, 2 ) ), 1, 1 ) \text{ $._("or") } x = decimalFraction( -B / 2 - sqrt( C * -1 + pow( B / 2, 2 ) ), 1, 1 ) - x = decimalFraction( -B / 2 + sqrt( C * -1 + pow( B / 2, 2 ) ), 1, 1 ) \text{ or } x = decimalFraction( -B / 2 - sqrt( C * -1 + pow( B / 2, 2 ) ), 1, 1 ) + x = decimalFraction( -B / 2 + sqrt( C * -1 + pow( B / 2, 2 ) ), 1, 1 ) \text{$._("or") } x = decimalFraction( -B / 2 - sqrt( C * -1 + pow( B / 2, 2 ) ), 1, 1 )

35 exercises/congruency_postulates.html
 @@ -29,12 +29,12 @@ ( ( TYPE !== 'SSA' ) || ( (TRIANGLE.niceSideLengths[0] + 1) < TRIANGLE.niceSideLengths[1] && abs(ANGLES[0] - 90) > 10 ) )"> randFromArray([ "SSS", "SAS", "SAA", "ASA", "SSA", "SSA", "AAA" ]) { - "SSS": "Side-Side-Side", - "SAS": "Side-Angle-Side", - "SAA": "Side-Angle-Angle", - "ASA": "Angle-Side-Angle", - "SSA": "Side-Side-Angle", - "AAA": "Angle-Angle-Angle" + "SSS": $._("Side-Side-Side"), + "SAS":$._("Side-Angle-Side"), + "SAA": $._("Side-Angle-Angle"), + "ASA":$._("Angle-Side-Angle"), + "SSA": $._("Side-Side-Angle"), + "AAA":$._("Angle-Angle-Angle") }[ TYPE ] randomTriangleAngles.triangle() @@ -45,12 +45,19 @@ randRange( 0, 360 )

- Is NAME a triangle congruency postulate?
- Answer the question by clicking and dragging the points below to see how many different triangles you can construct.
- If you can only construct congruent triangles, then the NAME postulate is true. The NAME postulate is not true if you can construct two or more different triangles using the given information. + Is NAME a triangle congruency + postulate?
+ Answer the question by clicking and dragging the points + below to see how many different triangles you can + construct.
+ If you can only construct congruent triangles, then the + NAME postulate is true. The NAME + postulate is not true if you can construct two or more + different triangles using the given information.

- Your triangle can be anywhere. There is no need to line up the two triangles. + Your triangle can be anywhere. There is no need to line + up the two triangles.
init({ range: [ [ -6.2, 6.2 ], [ -5.9, 6.5 ] ] @@ -74,10 +81,10 @@
@@ -109,9 +116,9 @@ } else if ( guess[0] !== ANSWER ) { return false; } else if ( !isTriangle ) { - return "Your answer is almost correct, but you haven't constructed a triangle."; + return $._("Your answer is almost correct, but you havent constructed a triangle."); } else if ( ANSWER === "No" && isCongruent ) { - return "Your answer is almost correct, but the two triangles are congruent. Prove your answer by trying to construct an incongruent triangle."; + return$._("Your answer is almost correct, but the two triangles are congruent. Prove your answer by trying to construct an incongruent triangle."); } else { return true; }
11 exercises/congruent_segments.html
 @@ -14,8 +14,9 @@
- random() < 0.5 ? "Yes" : "No" -
+ [$._("Yes"),$._("No")] + random() < 0.5 ? YES : NO +
sortNumbers( randRangeUnique( -5, 5, 4 ) )
[ BLUE, GREEN, PINK, ORANGE ] @@ -51,8 +52,8 @@
SOLUTION
-
• Yes
• -
• No
• +
• YES
• +
• NO
@@ -72,7 +73,7 @@ AB = POINTS[ 1 ] - POINTS[ 0 ] CD = POINTS[ 3 ] - POINTS[ 2 ]

-
+

AB = CD

Yes, \overline{AB} and \overline{CD} are congruent.

15 exercises/congruent_triangles_1.html
 @@ -10,10 +10,11 @@
randomTriangleAngles.triangle() 5 + random() * 2 - randRange( 0, 1 ) === 1 ? true : false + randRange( 0, 1 ) === 1 IS_B ? MAIN : randomTriangleAngles.triangle() IS_B ? MAIN_SIZE : 2 + random() * 2 - IS_B ? "Yes" : "No" + [$._("Yes"),$._("No"), $._("There is not enough information to say")] + IS_B ? 0 : 1 [ 0, 1, 2 ] A_ANGLES @@ -69,11 +70,11 @@ TR_B.drawLabels(); - ANSWER + CHOICES[ANSWER] - • Yes • - • No • - • There is not enough information to say • + • + choice + @@ -129,7 +130,7 @@ [ 0, 1, 2 ] [ ] - IS_B ? "There is not enough information to say" : "No" + IS_B ? 2 : 1 In this problem we know all three triangle angles. 65 exercises/counting_1.html  @@ -13,24 +13,71 @@ randRange( 20, 50 ) randRange( 20, 40 ) START + ANSWER - 1 - spin( "{do,did,problems|read,read,{pages|papers|articles}}" ).split( "," ) + randRange(0, 1) === 0 + DO_BOOL ?$._("problems") : randFromArray([$._("pages"),$._("papers"), $._("articles")]) + randRange(0, 1) === 0 + randRange(0, 1) === 0 - - person( 1 ) {had to DO|was assigned} PROBLEMS START through END for homework {{last {week|night}}|tonight}. + + + + person( 1 ) had to do PROBLEMS START through END for homework last week. + + person( 1 ) had to do PROBLEMS START through END for homework tonight. + + person( 1 ) was assigned PROBLEMS START through END for homework last week. + + person( 1 ) was assigned PROBLEMS START through END for homework tonight. + + + + person( 1 ) had to read PROBLEMS START through END for homework last week. + + person( 1 ) had to read PROBLEMS START through END for homework tonight. + + person( 1 ) was assigned PROBLEMS START through END for homework last week. + + person( 1 ) was assigned PROBLEMS START through END for homework tonight. + + - - If person( 1 ) DID all of the PROBLEMS he was assigned, how many PROBLEMS did he DO? - - If person( 1 ) DID all of the PROBLEMS she was assigned, how many PROBLEMS did she DO? + + + If person( 1 ) did all of the PROBLEMS he was assigned, how many PROBLEMS did he do? + + If person( 1 ) read all of the PROBLEMS he was assigned, how many PROBLEMS did he read? + + + + If person( 1 ) did all of the PROBLEMS she was assigned, how many PROBLEMS did she do? + + If person( 1 ) read all of the PROBLEMS she was assigned, how many PROBLEMS did she read? + ANSWER PROBLEMS Instead of counting PROBLEMS START through END, we can subtract START - 1 from each number so we instead consider PROBLEMS 1 through ANSWER. - We see that person( 1 ) DID ANSWER PROBLEMS. - Notice that he DID ANSWER and not ANSWER - 1 PROBLEMS. Notice that she DID ANSWER and not ANSWER - 1 PROBLEMS. + + We see that person( 1 ) did ANSWER PROBLEMS. + + We see that person( 1 ) read ANSWER PROBLEMS. + + + + Notice that he did ANSWER and not ANSWER - 1 PROBLEMS. + + Notice that he read ANSWER and not ANSWER - 1 PROBLEMS. + + + + Notice that she did ANSWER and not ANSWER - 1 PROBLEMS. + + Notice that she read ANSWER and not ANSWER - 1 PROBLEMS. + + 111 exercises/creating_bar_charts_1.html  @@ -22,22 +22,53 @@ - randFromArray([ "animal", "color", "fruit", "course" ]) -$.map( _.range(5), function( n ) { return ( KhanUtil[ SUBJECT ] )( n + 1 ); } ) - $.map( _.range(5), function() { return randRange( 0, 10 ); } ) - sum( DATA ) - randFromArray([ "student", "teacher", "person" ]) + randFromArray([ + [new Plural(function(num) { + return$.ngettext("animal", "animals", num); + }), KhanUtil.animal], + [new Plural(function(num) { + return $.ngettext("color", "colors", num); + }), KhanUtil.color], + [new Plural(function(num) { + return$.ngettext("fruit", "fruits", num); + }), KhanUtil.fruit], + [new Plural(function(num) { + return $.ngettext("course", "courses", num); + }), KhanUtil.course] + ]) + _.times(5, function(n) { return SUBJECT_FUNC(n + 1); } ) + _.times(5, function() { return randRange(0, 10); } ) + sum(DATA) + randFromArray([ + new Plural(function(num) { + return$.ngettext("student", "students", num); + }), + new Plural(function(num) { + return $.ngettext("teacher", "teachers", num); + }), + new Plural(function(num) { + return$.ngettext("person", "people", num); + }) + ]) + shuffle(_.zip(DATA, CATEGORIES))
-

TOTAL RESPONDENT were asked about their favorite SUBJECT. - toSentence( shuffle( $.map( DATA, function( num, i ) { - return "<code>" + num + "</code> " + plural( RESPONDENT, num ) + " said " + CATEGORIES[ i ]; - }) ) ). TOTAL AMBIGUOUS_PLURAL(RESPONDENT, TOTAL) were asked about their favorite SUBJECT. - toSentence( shuffle($.map( DATA, function( num, i ) { - return "<code>" + num + "</code> " + plural( RESPONDENT, num ) + " said " + CATEGORIES[ i ]; - }) ) ).

+

+ + TOTAL RESPONDENT was asked about their favorite SUBJECT. + + TOTAL plural_form(RESPONDENT, TOTAL) were asked about their favorite SUBJECT. + + + + DATA[0] RESPONDENT said DATA[1]. + + DATA[0] plural_form(RESPONDENT, DATA[0]) said DATA[1]. + + +

-

Create a bar chart showing everyone's favorite AMBIGUOUS_PLURAL(SUBJECT):

+

Create a bar chart showing everyone's favorite plural_form(SUBJECT):

@@ -87,17 +118,30 @@ line( [ 0, 0 ], [ 0, 10 ] ); }); - label( [ 8, -0.8 ], "<b>" + SUBJECT + "</b>", "below", false ).css( "text-transform", "capitalize" ); - $( label( [ -1.5, 5 ], "<b>Number of " + plural( RESPONDENT ) + "</b>", "center", false ) ).addClass( "rotate" ); - label( [ 8, 10.5 ], "<b>Favorite " + SUBJECT + "s</b>", "above", false ); + label([8, -0.8], + SUBJECT + "", + "below", false) + .css("text-transform", "capitalize") + .css("font-weight", "bold"); + label([-1.5, 5], +$._("Number of %(respondent)s", { respondent: plural_form(RESPONDENT) }), + "center", false) + .css("font-weight", "bold") + .addClass("rotate"); + label([8, 10.5], + $._("Favorite %(subject)s", { subject: plural_form(SUBJECT) }), + "above", false) + .css("font-weight", "bold"); Create a bar chart by dragging the top of each bar up and down. -$.map( new Array( 5 ), function( val, n ) { return graph.lines[ n ].coordA[1]; })
+
+ _.times(5, function(n) { return graph.lines[ n ].coordA[1]; }) +
if ( _.isEqual( guess, [ 0.5, 0.5, 0.5, 0.5, 0.5 ] ) ) { return ""; @@ -119,27 +163,24 @@
-

- NUM RESPONDENT said their - favorite SUBJECT was CATEGORIES[ INDEX ]. - - So the top of the bar for "CATEGORIES[ INDEX ]" should line up with the number - NUM on the left side of the chart. +

+ + NUM RESPONDENT said their + favorite SUBJECT was CATEGORIES[ INDEX ]. + + NUM plural_form(RESPONDENT, NUM) said their + favorite SUBJECT was CATEGORIES[ INDEX ]. - - So there should be no bar above "CATEGORIES[ INDEX ]". Drag the top of the bar all - the way to the bottom to get rid of the bar. - -

- NUM AMBIGUOUS_PLURAL(RESPONDENT, NUM) said their - favorite SUBJECT was CATEGORIES[ INDEX ]. - So the top of the bar for "CATEGORIES[ INDEX ]" should line up with the number + So the top of the bar for + "CATEGORIES[ INDEX ]" + should line up with the number NUM on the left side of the chart. - - - So there should be no bar above "CATEGORIES[ INDEX ]". Drag the top of the bar all - the way to the bottom to get rid of the bar. + + So there should be no bar above + "CATEGORIES[ INDEX ]". + Drag the top of the bar all the way to the bottom to get + rid of the bar.

90 exercises/defined_and_undefined_matrix_operations.html
 @@ -9,7 +9,8 @@
- DEFINED ? "Yes" : "No" + [$._("Yes"),$._("No")] + DEFINED ? YES : NO makeMatrix(randRange(-2, 4, DIM_1, DIM_2)) makeMatrix(randRange(-2, 4, DIM_3, DIM_4)) @@ -40,8 +41,8 @@

-
• Yes
• -
• No
• +
• YES
• +
• NO
@@ -59,47 +60,75 @@
-

- In order for additionsubtraction of two matrices to be defined, the matrices must have the same dimensions. -

-

- If PRETTY_MAT_1_ID is of dimension (\blue m \times \red n) and PRETTY_MAT_2_ID is of dimension (\blue p \times \red q), then: -

+ +

+ In order for addition of two matrices to be + defined, the matrices must have the same + dimensions. +

+

+ If PRETTY_MAT_1_ID is of + dimension (\blue m \times \red n) and + PRETTY_MAT_2_ID is of + dimension (\blue p \times \red q), + then for their sum to be defined: +

+
+

+ In order for subtraction of two matrices to be + defined, the matrices must have the same + dimensions. +

+

+ If PRETTY_MAT_1_ID is of + dimension (\blue m \times \red n) and + PRETTY_MAT_2_ID is of + dimension (\blue p \times \red q), + then for their difference to be defined: +

+

1. \blue m (number of rows in PRETTY_MAT_1_ID) must equal \blue p (number of rows in PRETTY_MAT_2_ID) and

2. \red n (number of columns in PRETTY_MAT_1_ID) must equal \red q (number of columns in PRETTY_MAT_2_ID)

-

- for their sumdifference to be defined. -

Do PRETTY_MAT_1_ID and PRETTY_MAT_2_ID have the same number of rows?

- DIM_1 === DIM_3 ? "Yes" : "No" + DIM_1 === DIM_3 ? YES : NO

- - + +

Do PRETTY_MAT_1_ID and PRETTY_MAT_2_ID have the same number of columns?

- DIM_2 === DIM_4 ? "Yes" : "No" + DIM_2 === DIM_4 ? YES : NO

- - + +

-

- Since PRETTY_MAT_1_ID has the samedifferent dimensions (DIM_1 + "\\times" + DIM_2) asfrom PRETTY_MAT_2_ID (DIM_3 + "\\times" + DIM_4), -

- PRETTY_MAT_1_ID + OPERATION + PRETTY_MAT_2_ID is not defined. +

+ Since PRETTY_MAT_1_ID has + the same dimensions + (DIM_1 + "\\times" + DIM_2) as + PRETTY_MAT_2_ID (DIM_3 + "\\times" + DIM_4), + PRETTY_MAT_1_ID + OPERATION + PRETTY_MAT_2_ID + is defined. +

+ Since PRETTY_MAT_1_ID has + different dimensions + (DIM_1 + "\\times" + DIM_2) from + PRETTY_MAT_2_ID (DIM_3 + "\\times" + DIM_4), + PRETTY_MAT_1_ID + OPERATION + PRETTY_MAT_2_ID + is not defined.

@@ -148,8 +177,21 @@

-
- Since PRETTY_MAT_1_ID has the samea different number of columns (DIM_2) asthan PRETTY_MAT_2_ID has rows (DIM_3), PRETTY_MAT_1_ID + PRETTY_MAT_2_ID is not defined. +
+ Since PRETTY_MAT_1_ID has the same + number of columns (DIM_2) as + PRETTY_MAT_2_ID has rows + (DIM_3), + PRETTY_MAT_1_ID + PRETTY_MAT_2_ID + is defined. +
+ Since PRETTY_MAT_1_ID has a + different number of columns + (DIM_2) than + PRETTY_MAT_2_ID has rows + (DIM_3), + PRETTY_MAT_1_ID + PRETTY_MAT_2_ID + is not defined.
31 exercises/dice_probability.html
 @@ -233,30 +233,47 @@ - For a given roll, what is the probability that the dice are - X and Y in any order - both equal to X? + + For a given roll, what is the probability that the dice are + X and Y + in any order? + + For a given roll, what is the probability that the dice are + X and Y? + + + For a given roll, what is the probability that the dice are + both equal to X? +
rand(2) - EVEN ? "odd" : "even" function(x, y) { return x % 2 === EVEN && y === Y; }
- For a given roll, what is the probability that the black die is - EVEN_OR_ODD and the white die is Y? + + For a given roll, what is the probability that the black + die is even and the white die is Y? + + For a given roll, what is the probability that the black + die is even and the white die is Y? +
-

How many EVEN_OR_ODD numbers are there on the black die?

+

+ How many even numbers are there on the black die? +

+ How many odd numbers are there on the black die? +

21 exercises/direct_and_inverse_variation.html
 @@ -11,6 +11,11 @@ [["x", "y"], ["a", "b"], ["m", "n"]] randFromArray(VARIABLE_NAMES) + + { + v1: "<code><var>V1</var></code>", + v2: "<code><var>V2</var></code>", + } rand(2) randRange(2, 9) @@ -23,10 +28,10 @@
randFromArray([ - "<code><var>V1</var></code> is directly proportional to <code><var>V2</var></code>", - "<code><var>V1</var></code> and <code><var>V2</var></code> vary directly", - "<code><var>V1</var></code> varies directly with <code><var>V2</var></code>", - "<code><var>V1</var></code> and <code><var>V2</var></code> are in direct variation" + $._("%(v1)s is directly proportional to %(v2)s", V1V2), +$._("%(v1)s and %(v2)s vary directly", V1V2), + $._("%(v1)s varies directly with %(v2)s", V1V2), +$._("%(v1)s and %(v2)s are in direct variation", V1V2) ])
@@ -95,10 +100,10 @@
randFromArray([ - "<code><var>V1</var></code> is inversely proportional to <code><var>V2</var></code>", - "<code><var>V1</var></code> and <code><var>V2</var></code> vary inversely", - "<code><var>V1</var></code> varies inversely with <code><var>V2</var></code>", - "<code><var>V1</var></code> and <code><var>V2</var></code> are in inverse variation" + $._("%(v1)s is inversely proportional to %(v2)s", V1V2), +$._("%(v1)s and %(v2)s vary inversely", V1V2), + $._("%(v1)s varies inversely with %(v2)s", V1V2), +$._("%(v1)s and %(v2)s are in inverse variation", V1V2) ])
22 exercises/exploring_mean_and_median.html
 @@ -75,8 +75,9 @@ [0, 0.7], [0.05, 0.7], [0, 0.6], [-0.05, 0.7], [0, 0.7], [0, 1.0] ]); - // I18N: "mean" in the "average" sense - graph.meanLabel = label([0, 1.3], "\\text{" + $._("mean") + "}", + graph.meanLabel = label([0, 1.3], + // I18N: "mean" as in "average" + "\\text{" +$._("mean") + "}", "above", { color: BLUE }); graph.meanValueLabel = label([0, 0.8], "0", "above", { color: BLUE }); @@ -86,7 +87,8 @@ [0, -1.1], [0.05, -1.1], [0, -1], [-0.05, -1.1], [0, -1.1], [0, -1.4] ]); - graph.medianLabel = label([0, -1.7], "\\text{" + $._("median") + "}", + graph.medianLabel = label([0, -1.7], + "\\text{" +$._("median") + "}", "below", { color: GREEN }); graph.medianValueLabel = label([0, -1.2], "0", "below", { color: GREEN }); @@ -164,9 +166,10 @@ MEDIAN.
- +

As long as there are as many points to the left and to @@ -182,9 +185,10 @@ MEAN and the median is MEDIAN. - +

11 exercises/exponents_1.html
 @@ -59,8 +59,6 @@ pickIntegerBasePositiveExponent() VALS.base VALS.exp - - BASE > 0 ? "" : ( isEven( EXP ) ? "even" : "odd" )

\Large negParens( BASE )^{EXP}

@@ -79,8 +77,13 @@
-

Cardinal( BASE ) to any NEG_ONE_HINT power equals... ?

-

Cardinal( BASE ) to any NEG_ONE_HINT power equals cardinal( round( pow( BASE, EXP ) ) ).

+ +

Cardinal( BASE ) to any even power equals... ?

+

Cardinal( BASE ) to any even power equals cardinal( round( pow( BASE, EXP ) ) ).

+
+

Cardinal( BASE ) to any odd power equals... ?

+

Cardinal( BASE ) to any odd power equals cardinal( round( pow( BASE, EXP ) ) ).

+