Browse files

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

  • Loading branch information...
1 parent 4e4cb9b commit e2486732344884bce64beb8d2dc60bf80fc8fa1a @mwahl mwahl committed Apr 11, 2012
View
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;
View
10 exercises/adding_and_subtracting_complex_numbers.html
@@ -21,10 +21,10 @@
( OPERATION === "add" ? ( A_IMAG + B_IMAG ) : ( A_IMAG - B_IMAG ) )
</var>
<var id="A_REP">
- complexNumber( A_REAL, A_IMAG )
+ complexNumber(A_REAL, A_IMAG)
</var>
<var id="B_REP">
- complexNumber( B_REAL, B_IMAG )
+ complexNumber(B_REAL, B_IMAG)
</var>
<var id="A_REP_COLORED">
"\\color{" + ORANGE + "}{" + A_REP + "}"
@@ -65,20 +65,20 @@
The real components of the two complex numbers are <code class="hint_orange"><var>A_REAL</var></code> and <code class="hint_blue"><var>B_REAL</var></code>, respectively,
so the real component of the result will be
<code>
- <var>A_REAL_COLORED</var> <var>OPERATOR</var> \color{<var>BLUE</var>}{<var>negParens( B_REAL )</var>}
+ <var>A_REAL_COLORED</var> <var>OPERATOR</var> \color{<var>BLUE</var>}{<var>negParens(B_REAL)</var>}
</code>,
which equals <code><var>ANSWER_REAL</var></code>.
</p>
<p>
The imaginary components of the two complex numbers are <code class="hint_orange"><var>A_IMAG</var></code> and <code class="hint_blue"><var>B_IMAG</var></code>, respectively,
so the imaginary component of the result will be
<code>
- <var>A_IMAG_COLORED</var> <var>OPERATOR</var> \color{<var>BLUE</var>}{<var>negParens( B_IMAG )</var>}
+ <var>A_IMAG_COLORED</var> <var>OPERATOR</var> \color{<var>BLUE</var>}{<var>negParens(B_IMAG)</var>}
</code>,
which equals <code><var>ANSWER_IMAG</var></code>.
</p>
<p>
- The result is <code><var>complexNumber( ANSWER_REAL, ANSWER_IMAG )</var></code>; its real component is <code><var>ANSWER_REAL</var></code>
+ The result is <code><var>complexNumber(ANSWER_REAL, ANSWER_IMAG)</var></code>; its real component is <code><var>ANSWER_REAL</var></code>
and its complex component is <code><var>ANSWER_IMAG</var></code>.
</p>
</div>
View
1 exercises/adding_and_subtracting_polynomials.html
@@ -113,7 +113,6 @@
<div>
<p>Add the coefficients.</p>
<p><code><var>POL_1.add(POL_2).text()</var></code></p>
- <p>You're done!</p>
</div>
</div>
</div>
View
2 exercises/adding_decimals.html
@@ -48,7 +48,7 @@
<div class="hints">
<div class="graphie" data-update="numbers">
graph.adder.show();
- graph.adder.showDecimals( A_DECIMAL, B_DECIMAL );
+ graph.adder.showDecimals(A_DECIMAL, B_DECIMAL);
</div>
<div class="graphie" data-update="numbers" data-each="DUMMY as dummy">
graph.adder.showHint();
View
4 exercises/adding_fractions_with_common_denominators.html
@@ -38,9 +38,7 @@
init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
piechart( [ N1+N2, D - N2 - N1], ["#e00", "#999"], 2 );
</div>
- <div>
- <p><code><var>fraction( N1, D )</var> + <var>fraction( N2, D )</var> = <var>fraction( N1 + N2, D )</var></code></p>
- </div>
+ <p><code><var>fraction( N1, D )</var> + <var>fraction( N2, D )</var> = <var>fraction( N1 + N2, D )</var></code></p>
<div data-if="getGCD( N1 + N2, D ) !== 1">
<p>Simplify.</p>
<div class="graphie">
View
24 exercises/age_word_problems.html
@@ -31,7 +31,8 @@
<p><var>person(2)</var> is <code><var>personVar(1)</var> - <var>A</var></code> years old right now, so <var>B</var> years ago, <var>he(2)</var> was <code>(<var>personVar(1)</var> - <var>A</var>) - <var>B</var> = <var>personVar(1)</var> - <var>A + B</var></code> years old.</p>
<p><var>person(1)</var> was <var>C</var> times as old as <var>person(2)</var>, so that means <code><var>personVar(1)</var> - <var>B</var> = <var>C</var> (<var>personVar(1)</var> - <var>A + B</var>)</code>.</p>
<p>Expand: <code><var>personVar(1)</var> - <var>B</var> = <var>C</var> <var>personVar(1)</var> - <var>C * (A + B)</var></code>.</p>
- <p>Solve for <code><var>personVar(1)</var></code> to get <code><var>C - 1</var> <var>personVar(1)</var> = <var>C * (A + B) - B</var></code>; <code><var>personVar(1)</var> = <var>(C * (B + A) - B) / (C - 1)</var></code>.</p>
+ <p>Solve for <code><var>personVar(1)</var></code> to get <code><var>C - 1</var> <var>personVar(1)</var> = <var>C * (A + B) - B</var></code>.</p>
+ <p><code><var>personVar(1)</var> = <var>(C * (B + A) - B) / (C - 1)</var></code>.</p>
</div>
</div>
@@ -51,7 +52,8 @@
<p><var>Cardinal(B)</var> years ago, <var>person(2)</var> was <code><var>personVar(2)</var> - <var>B</var></code> years old.</p>
<p><var>person(1)</var> was <var>C</var> times as old as <var>person(2)</var>, so that means <code><var>personVar(2)</var> + <var>A - B</var> = <var>C</var> (<var>personVar(2)</var> - <var>B</var>)</code>.</p>
<p>Expand: <code><var>personVar(2)</var> + <var>A - B</var> = <var>C</var> <var>personVar(2)</var> - <var>C * B</var></code>.</p>
- <p>Solve for <code><var>personVar(2)</var></code> to get <code><var>C - 1</var> <var>personVar(2)</var> = <var>A - B + C * B</var></code>; <code><var>personVar(2)</var> = <var>(A - B + C * B) / (C - 1)</var></code>.</p>
+ <p>Solve for <code><var>personVar(2)</var></code> to get <code><var>C - 1</var> <var>personVar(2)</var> = <var>A - B + C * B</var></code>.</p>
+ <p><code><var>personVar(2)</var> = <var>(A - B + C * B) / (C - 1)</var></code>.</p>
</div>
</div>
@@ -76,7 +78,8 @@
<p><var>His(2)</var> age can also be written as <code><var>personVar(1)</var> - <var>A</var></code>.</p>
<p>Set the two expressions for <var>person(2)</var>'s age equal to each other: <code><var>personVar(1)</var> / <var>C</var> = <var>personVar(1)</var> - <var>A</var></code>.</p>
<p>Multiply both sides by <code><var>C</var></code> to get <code><var>personVar(1)</var> = <var>C</var> <var>personVar(1)</var> - <var>A * C</var></code>.</p>
- <p>Solve for <code><var>personVar(1)</var></code> to get <code><var>C - 1</var> <var>personVar(1)</var> = <var>A * C</var></code>; <code><var>personVar(1)</var> = <var>A * C / (C - 1)</var></code>.</p>
+ <p>Solve for <code><var>personVar(1)</var></code> to get <code><var>C - 1</var> <var>personVar(1)</var> = <var>A * C</var></code>.</p>
+ <p><code><var>personVar(1)</var> = <var>A * C / (C - 1)</var></code>.</p>
</div>
</div>
@@ -95,7 +98,8 @@
<p>We know <var>person(1)</var> is <var>C</var> times as old as <var>person(2)</var>, so <var>person(1)</var>'s age can be written as <code><var>C</var> <var>personVar(2)</var></code>.</p>
<p><var>His(1)</var> age can also be written as <code><var>personVar(2)</var> + <var>A</var></code>.</p>
<p>Set the two expressions for <var>person(1)</var>'s age equal to each other: <code><var>C</var> <var>personVar(2)</var> = <var>personVar(2)</var> + <var>A</var></code>.</p>
- <p>Solve for <code><var>personVar(2)</var></code> to get <code><var>C - 1</var> <var>personVar(2)</var> = <var>A</var></code>; <code><var>personVar(2)</var> = <var>A / (C - 1)</var></code>.</p>
+ <p>Solve for <code><var>personVar(2)</var></code> to get <code><var>C - 1</var> <var>personVar(2)</var> = <var>A</var></code>.</p>
+ <p><code><var>personVar(2)</var> = <var>A / (C - 1)</var></code>.</p>
</div>
</div>
@@ -119,7 +123,8 @@
<p><var>B</var> years ago, <var>person(1)</var> was <code><var>personVar(1)</var> - <var>B</var></code> years old and <var>person(2)</var> was <code><var>personVar(1)</var> / <var>A</var> - <var>B</var></code> years old.</p>
<p>At that time, <var>person(1)</var> was <var>C</var> times as old as <var>person(2)</var>, so we can write <code><var>personVar(1)</var> - <var>B</var> = <var>C</var> (<var>personVar(1)</var> / <var>A</var> - <var>B</var>)</code>.</p>
<p>Expand: <code><var>personVar(1)</var> - <var>B</var> = <var>fractionReduce(C, A)</var> <var>personVar(1)</var> - <var>C * B</var></code>.</p>
- <p>Solve for <code><var>personVar(1)</var></code> to get <code><var>fractionReduce(C - A, A)</var> <var>personVar(1)</var> = <var>B * (C - 1)</var></code>; <code><var>personVar(1)</var> = <var>fractionReduce(A, C - A)</var> \cdot <var>B * (C - 1)</var> = <var>A * B * (C - 1) / (C - A)</var></code>.</p>
+ <p>Solve for <code><var>personVar(1)</var></code> to get <code><var>fractionReduce(C - A, A)</var> <var>personVar(1)</var> = <var>B * (C - 1)</var></code>.</p>
+ <p><code><var>personVar(1)</var> = <var>fractionReduce(A, C - A)</var> \cdot <var>B * (C - 1)</var> = <var>A * B * (C - 1) / (C - A)</var></code>.</p>
</div>
</div>
@@ -137,7 +142,8 @@
<p><var>Cardinal(B)</var> years ago, <var>person(1)</var> was <code><var>A</var> <var>personVar(2)</var> - <var>B</var></code> years old and <var>person(2)</var> was <code><var>personVar(2)</var> - <var>B</var></code> years old.</p>
<p>At that time, <var>person(1)</var> was <var>C</var> times as old as <var>person(2)</var>, so we can write <code><var>A</var> <var>personVar(2)</var> - <var>B</var> = <var>C</var> (<var>personVar(2)</var> - <var>B</var>)</code>.</p>
<p>Expand: <code><var>A</var> <var>personVar(2)</var> - <var>B</var> = <var>C</var> <var>personVar(2)</var> - <var>B * C</var></code>.</p>
- <p>Solve for <code><var>personVar(2)</var></code> to get <code><var>C - A</var> <var>personVar(2)</var> = <var>B * (C - 1)</var></code>; <code><var>personVar(2)</var> = <var>B * (C - 1) / (C - A)</var></code>.</p>
+ <p>Solve for <code><var>personVar(2)</var></code> to get <code><var>C - A</var> <var>personVar(2)</var> = <var>B * (C - 1)</var></code>
+ <p><code><var>personVar(2)</var> = <var>B * (C - 1) / (C - A)</var></code>.</p>
</div>
</div>
@@ -159,7 +165,8 @@
<p>In <var>B</var> years, <var>he(1)</var> will be <code><var>personVar(1)</var> + <var>B</var></code> years old.</p>
<p>At that time, <var>he(1)</var> will also be <code><var>A</var> <var>personVar(1)</var></code> years old.</p>
<p>We write <code><var>personVar(1)</var> + <var>B</var> = <var>A</var> <var>personVar(1)</var></code>.</p>
- <p>Solve for <code><var>personVar(1)</var></code> to get <code><var>A - 1</var> <var>personVar(1)</var> = <var>B</var></code>; <code><var>personVar(1)</var> = <var>B / (A - 1)</var></code>.</p>
+ <p>Solve for <code><var>personVar(1)</var></code> to get <code><var>A - 1</var> <var>personVar(1)</var> = <var>B</var></code></p>
+ <p><code><var>personVar(1)</var> = <var>B / (A - 1)</var></code>.</p>
</div>
</div>
@@ -183,7 +190,8 @@
<p>At that time, <var>person(1)</var> will be <var>C</var> times as old as <var>person(2)</var>.</p>
<p>We write <code><var>A</var> + y = <var>C</var> (<var>B</var> + y)</code>.</p>
<p>Expand to get <code><var>A</var> + y = <var>C * B</var> + <var>C</var> y</code>.</p>
- <p>Solve for <code>y</code> to get <code><var>C - 1</var> y = <var>A - C * B</var></code>; <code>y = <var>(A - C * B) / (C - 1)</var></code>.</p>
+ <p>Solve for <code>y</code> to get <code><var>C - 1</var> y = <var>A - C * B</var></code></p>
+ <p><code>y = <var>(A - C * B) / (C - 1)</var></code>.</p>
</div>
</div>
</div>
View
6 exercises/alternate_exterior_angles.html
@@ -45,12 +45,6 @@
graph.pl.drawAngle( UNKNOWN_INDEX, true, "#FFA500" );
</div>
</div>
- <div>
- <p>Note that the green angle also measures <var>MEASURE</var> degrees. This makes sense because it is opposite the orange angle and corresponds with the blue angle.</p>
- <div class="graphie" data-update="parallel-lines">
- graph.pl.drawVerticalAngle( UNKNOWN_INDEX, true, "#28AE7B" );
- </div>
- </div>
</div>
</div>
</body>
View
6 exercises/alternate_interior_angles.html
@@ -45,12 +45,6 @@
graph.pl.drawAngle( UNKNOWN_INDEX, true, "#FFA500" );
</div>
</div>
- <div>
- <p>Note that the green angle also measures <var>MEASURE</var> degrees. This makes sense because it is opposite the orange angle and corresponds with the blue angle.</p>
- <div class="graphie" data-update="parallel-lines">
- graph.pl.drawVerticalAngle( UNKNOWN_INDEX, true, "#28AE7B" );
- </div>
- </div>
</div>
</div>
</body>
View
5 exercises/angles_of_a_polygon.html
@@ -58,7 +58,7 @@
<p>There <var>plural( "is", SIDES - 4 )</var> <var>plural( SIDES - 4, "side" )</var> between the orange triangles, to make <var>SIDES - 4</var> additional <var>plural( "triangle", SIDES - 4 )</var>.</p>
<p>We chopped this polygon into <var>SIDES - 2</var> triangles, and each triangle's angles sum to 180 degrees.</p>
<p><code><var>SIDES - 2</var> \times 180^{\circ} = <var>ANSWER</var>^{\circ}</code></p>
- <p>Again, we have found that the sum of the polygon's interior angles is <var>ANSWER</var> degrees.</p>
+ <p>The sum of the polygon's interior angles is <var>ANSWER</var> degrees.</p>
</div>
</div>
<div id="exterior">
@@ -84,7 +84,8 @@
<div class="graphie" data-update="polygon">
graph.polygon.animateExteriorAngles( randRange( 0, SIDES - 1 ) );
</div>
- <p>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.</p>
+ <p>The exterior angles fit together to form a circle</p>
+ <p>Therefore, the sum of the exterior angles is 360 degrees.</p>
</div>
</div>
</div>
View
2 exercises/arithmetic_word_problems_2.html
@@ -149,7 +149,7 @@
<p>
<code><var>TOTAL</var>\text{ <var>plural( distance( 1 ) )</var>} \div <var>NUM2</var>\text{ days} = <var>NUM1</var> \text{ <var>plural( distance(1) )</var> per day}</code>
</p>
- <p><var>person( 1 )</var> <var>biked( 1 )</var> <var>NUM1</var> <var>plural( distance(1) )</var> each day.
+ <p><var>person( 1 )</var> <var>biked( 1 )</var> <var>NUM1</var> <var>plural( distance(1) )</var> each day.</p>
</div>
</div>
View
2 exercises/congruent_triangles_1.html
@@ -85,7 +85,7 @@
<div class="hints" data-apply="appendContents">
<p>In this problem we are given the sides of the triangles, so we can compare them easily.</p>
<p data-if="IS_B">Triangle B has 3 sides the same as triangle A, so they are congruent.</p>
- <p data-else>The sides of triangle B are not the same as triangle A so they are not congruent</p>
+ <p data-else>Because the sides do not match, triangle B is not congruent with triangle A.</p>
</div>
</div>
View
6 exercises/converting_between_point_slope_and_slope_intercept.html
@@ -43,11 +43,7 @@
<div>
<p>Combine the constant terms on the right.</p>
<p><code>y = <var>expr([ "*", m, "x" ])</var> + <var>b</var></code></p>
- </div>
- <div>
- <p><strong>
- The equation is now in slope-intercept form, with a slope of <code><var>m</var></code> and a y-intercept of <code><var>b</var></code>.
- </strong></p>
+ <p>The equation is now in slope-intercept form, with a slope of <code><var>m</var></code> and a y-intercept of <code><var>b</var></code>.</p>
</div>
</div>
</div>
View
4 exercises/converting_decimals_to_fractions_1.html
@@ -42,10 +42,6 @@
<p><code>= <var>fraction( T * 10, 100 )</var> + <var>fraction( H, 100 )</var></code></p>
<p><code>= <var>fraction( T * 10 + H, 100 )</var></code></p>
</div>
- <div>
- <p>You can also skip a few steps by making a fraction with <code><var>floor( D * 100 )</var></code> as the numerator and <code>100</code> (because the decimal extends to the hundredths place) as the denominator.</p>
- <p><code><var>fraction( T * 10 + H, 100 )</var></code></p>
- </div>
</div>
</div>
</div>
View
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);
}
}

0 comments on commit e248673

Please sign in to comment.