Khan/khan-exercises

Changing last hint to answer + bolding last hint, take 1 (A -> C)

1 parent 4e4cb9b commit e2486732344884bce64beb8d2dc60bf80fc8fa1a mwahl committed Apr 11, 2012
2 css/khan-exercise.css
 @@ -10,7 +10,7 @@ var { font-style: normal; } .hint_gray { color: gray; } .hint_purple{ color: purple; } -.final_answer{ font-weight:bold; } +.final_answer { font-weight: bold; } div.subhint { border: 1px solid #aaaaaa;
 @@ -21,10 +21,10 @@ ( OPERATION === "add" ? ( A_IMAG + B_IMAG ) : ( A_IMAG - B_IMAG ) ) - complexNumber( A_REAL, A_IMAG ) + complexNumber(A_REAL, A_IMAG) - complexNumber( B_REAL, B_IMAG ) + complexNumber(B_REAL, B_IMAG) "\\color{" + ORANGE + "}{" + A_REP + "}" @@ -65,20 +65,20 @@ The real components of the two complex numbers are A_REAL and B_REAL, respectively, so the real component of the result will be - A_REAL_COLORED OPERATOR \color{BLUE}{negParens( B_REAL )} + A_REAL_COLORED OPERATOR \color{BLUE}{negParens(B_REAL)} , which equals ANSWER_REAL.

The imaginary components of the two complex numbers are A_IMAG and B_IMAG, respectively, so the imaginary component of the result will be - A_IMAG_COLORED OPERATOR \color{BLUE}{negParens( B_IMAG )} + A_IMAG_COLORED OPERATOR \color{BLUE}{negParens(B_IMAG)} , which equals ANSWER_IMAG.

 @@ -113,7 +113,6 @@

-

You're done!

 @@ -48,7 +48,7 @@
 @@ -38,9 +38,7 @@ init({ range: [ [-3, 3], [-3, 3] ], scale: 25 }); piechart( [ N1+N2, D - N2 - N1], ["#e00", "#999"], 2 ); -
-

fraction( N1, D ) + fraction( N2, D ) = fraction( N1 + N2, D )

-
+

fraction( N1, D ) + fraction( N2, D ) = fraction( N1 + N2, D )

Simplify.

24 exercises/age_word_problems.html
 @@ -31,7 +31,8 @@

person(2) is personVar(1) - A years old right now, so B years ago, he(2) was (personVar(1) - A) - B = personVar(1) - A + B years old.

person(1) was C times as old as person(2), so that means personVar(1) - B = C (personVar(1) - A + B).

Expand: personVar(1) - B = C personVar(1) - C * (A + B).

-

Solve for personVar(1) to get C - 1 personVar(1) = C * (A + B) - B; personVar(1) = (C * (B + A) - B) / (C - 1).

+

Solve for personVar(1) to get C - 1 personVar(1) = C * (A + B) - B.

+

personVar(1) = (C * (B + A) - B) / (C - 1).

@@ -51,7 +52,8 @@

Cardinal(B) years ago, person(2) was personVar(2) - B years old.

person(1) was C times as old as person(2), so that means personVar(2) + A - B = C (personVar(2) - B).

Expand: personVar(2) + A - B = C personVar(2) - C * B.

-

Solve for personVar(2) to get C - 1 personVar(2) = A - B + C * B; personVar(2) = (A - B + C * B) / (C - 1).

+

Solve for personVar(2) to get C - 1 personVar(2) = A - B + C * B.

+

personVar(2) = (A - B + C * B) / (C - 1).

@@ -76,7 +78,8 @@

His(2) age can also be written as personVar(1) - A.

Set the two expressions for person(2)'s age equal to each other: personVar(1) / C = personVar(1) - A.

Multiply both sides by C to get personVar(1) = C personVar(1) - A * C.

-

Solve for personVar(1) to get C - 1 personVar(1) = A * C; personVar(1) = A * C / (C - 1).

+

Solve for personVar(1) to get C - 1 personVar(1) = A * C.

+

personVar(1) = A * C / (C - 1).

@@ -95,7 +98,8 @@

We know person(1) is C times as old as person(2), so person(1)'s age can be written as C personVar(2).

His(1) age can also be written as personVar(2) + A.

Set the two expressions for person(1)'s age equal to each other: C personVar(2) = personVar(2) + A.

-

Solve for personVar(2) to get C - 1 personVar(2) = A; personVar(2) = A / (C - 1).

+

Solve for personVar(2) to get C - 1 personVar(2) = A.

+

personVar(2) = A / (C - 1).

@@ -119,7 +123,8 @@

B years ago, person(1) was personVar(1) - B years old and person(2) was personVar(1) / A - B years old.

At that time, person(1) was C times as old as person(2), so we can write personVar(1) - B = C (personVar(1) / A - B).

Expand: personVar(1) - B = fractionReduce(C, A) personVar(1) - C * B.

-

Solve for personVar(1) to get fractionReduce(C - A, A) personVar(1) = B * (C - 1); personVar(1) = fractionReduce(A, C - A) \cdot B * (C - 1) = A * B * (C - 1) / (C - A).

+

Solve for personVar(1) to get fractionReduce(C - A, A) personVar(1) = B * (C - 1).

+

personVar(1) = fractionReduce(A, C - A) \cdot B * (C - 1) = A * B * (C - 1) / (C - A).

@@ -137,7 +142,8 @@

Cardinal(B) years ago, person(1) was A personVar(2) - B years old and person(2) was personVar(2) - B years old.

At that time, person(1) was C times as old as person(2), so we can write A personVar(2) - B = C (personVar(2) - B).

Expand: A personVar(2) - B = C personVar(2) - B * C.

-

Solve for personVar(2) to get C - A personVar(2) = B * (C - 1); personVar(2) = B * (C - 1) / (C - A).

+

Solve for personVar(2) to get C - A personVar(2) = B * (C - 1) +

personVar(2) = B * (C - 1) / (C - A).

@@ -159,7 +165,8 @@

In B years, he(1) will be personVar(1) + B years old.

At that time, he(1) will also be A personVar(1) years old.

We write personVar(1) + B = A personVar(1).

-

Solve for personVar(1) to get A - 1 personVar(1) = B; personVar(1) = B / (A - 1).

+

Solve for personVar(1) to get A - 1 personVar(1) = B

+

personVar(1) = B / (A - 1).

@@ -183,7 +190,8 @@

At that time, person(1) will be C times as old as person(2).

We write A + y = C (B + y).

Expand to get A + y = C * B + C y.

-

Solve for y to get C - 1 y = A - C * B; y = (A - C * B) / (C - 1).

+

Solve for y to get C - 1 y = A - C * B

+

y = (A - C * B) / (C - 1).

6 exercises/alternate_exterior_angles.html
 @@ -45,12 +45,6 @@ graph.pl.drawAngle( UNKNOWN_INDEX, true, "#FFA500" ); -
-

Note that the green angle also measures MEASURE degrees. This makes sense because it is opposite the orange angle and corresponds with the blue angle.

-
- graph.pl.drawVerticalAngle( UNKNOWN_INDEX, true, "#28AE7B" ); -
-
6 exercises/alternate_interior_angles.html
 @@ -45,12 +45,6 @@ graph.pl.drawAngle( UNKNOWN_INDEX, true, "#FFA500" ); -
-

Note that the green angle also measures MEASURE degrees. This makes sense because it is opposite the orange angle and corresponds with the blue angle.

-
- graph.pl.drawVerticalAngle( UNKNOWN_INDEX, true, "#28AE7B" ); -
-
5 exercises/angles_of_a_polygon.html
 @@ -58,7 +58,7 @@

There plural( "is", SIDES - 4 ) plural( SIDES - 4, "side" ) between the orange triangles, to make SIDES - 4 additional plural( "triangle", SIDES - 4 ).

We chopped this polygon into SIDES - 2 triangles, and each triangle's angles sum to 180 degrees.

SIDES - 2 \times 180^{\circ} = ANSWER^{\circ}

-

Again, we have found that the sum of the polygon's interior angles is ANSWER degrees.

+

The sum of the polygon's interior angles is ANSWER degrees.

@@ -84,7 +84,8 @@
graph.polygon.animateExteriorAngles( randRange( 0, SIDES - 1 ) );
-

The exterior angles fit together to form a circle, so the sum of the exterior angles is same as the number of degrees in a circle: 360 degrees.

+

The exterior angles fit together to form a circle

+

Therefore, the sum of the exterior angles is 360 degrees.

2 exercises/arithmetic_word_problems_2.html
 @@ -149,7 +149,7 @@

TOTAL\text{ plural( distance( 1 ) )} \div NUM2\text{ days} = NUM1 \text{ plural( distance(1) ) per day}

-

person( 1 ) biked( 1 ) NUM1 plural( distance(1) ) each day. +

person( 1 ) biked( 1 ) NUM1 plural( distance(1) ) each day.

2 exercises/congruent_triangles_1.html
 @@ -85,7 +85,7 @@

In this problem we are given the sides of the triangles, so we can compare them easily.

Triangle B has 3 sides the same as triangle A, so they are congruent.

-

The sides of triangle B are not the same as triangle A so they are not congruent

+

Because the sides do not match, triangle B is not congruent with triangle A.

6 exercises/converting_between_point_slope_and_slope_intercept.html
 @@ -43,11 +43,7 @@

Combine the constant terms on the right.

y = expr([ "*", m, "x" ]) + b

-
-
-

- The equation is now in slope-intercept form, with a slope of m and a y-intercept of b. -

+

The equation is now in slope-intercept form, with a slope of m and a y-intercept of b.

4 exercises/converting_decimals_to_fractions_1.html
 @@ -42,10 +42,6 @@

= fraction( T * 10, 100 ) + fraction( H, 100 )

= fraction( T * 10 + H, 100 )

-
-

You can also skip a few steps by making a fraction with floor( D * 100 ) as the numerator and 100 (because the decimal extends to the hundredths place) as the denominator.

-

fraction( T * 10 + H, 100 )

-
12 khan-exercise.js
 @@ -1957,17 +1957,19 @@ var Khan = (function() { .val($(this).data("buttonText") || "I'd like another hint (" + hints.length + " remaining)"); var problem =$(hint).parent(); - - // Append first so MathJax can sense the surrounding CSS context properly - $(hint).appendTo("#hintsarea").runModules(problem); + + // Append first so MathJax can sense the surrounding CSS context properly +$(hint).appendTo("#hintsarea").runModules(problem); // Grow the scratchpad to cover the new hint Khan.scratchpad.resize(); - // Disable the get hint button + // Disable the get hint button & add final_answer class if (hints.length === 0) { - $(Khan).trigger("allHintsUsed"); +$(hint).addClass("final_answer"); + $(Khan).trigger("allHintsUsed"); +$(this).attr("disabled", true); } }