Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Fix errors with spelling and grammar. Also changed the test mode cond…
Browse files Browse the repository at this point in the history
…itional to allow "127.0.0.1".

Test plan:  Try out each exercise that I have modified, while using hints.
  • Loading branch information
rhc2104 committed Jul 27, 2011
1 parent 646d977 commit d89d39c
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 22 deletions.
4 changes: 2 additions & 2 deletions exercises/absolute_value_equations.html
Expand Up @@ -118,10 +118,10 @@
</div>
</div>
<p data-if="( D - B ) / ( A - C ) > 0">
So, the correct answer is <code><var>SOLUTION</var></code>.
Thus, the correct answer is <code><var>SOLUTION</var></code>.
</p>
<p data-else>
The absolute value can not be negative. So, there is no solution.
The absolute value cannot be negative. Therefore, there is no solution.
</p>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions exercises/angles_1.html
Expand Up @@ -662,7 +662,7 @@

<p>
<code>\color{purple}{\angle{DAK}} = 90&deg;</code>,
because angles formed by perpendicular lines equal to 90&deg;.
because angles formed by perpendicular lines are equal to 90&deg;.
<span class="graphie" data-update="alternate-exterior-and-complementary">
label( [-1.68, 2], "\\color{purple}{90&deg;}", "above left" );
arc( [0, 2], 1.65, 90, 180, {stroke: "purple"} );
Expand Down Expand Up @@ -726,4 +726,4 @@
</div> <!-- End of exercises -->
</body>
</html>
<!-- EOF -->
<!-- EOF -->
2 changes: 1 addition & 1 deletion exercises/angles_2.html
Expand Up @@ -390,7 +390,7 @@
\color{purple}{\angle{BHD}} =
180&deg; - \color{green}{\angle{BDC}} - \color{orange}{\angle{DBE}} =
<var>Tri_Z</var>&deg;.
</code> This is because interior angles of a triangle add up to 180&deg;.
</code> This is because the interior angles of a triangle add up to 180&deg;.
<span class="graphie" data-update="star1">
// label angle BHD
arc([3.2, 1.3], .75, 118, 220, { stroke: "purple" });
Expand Down
2 changes: 1 addition & 1 deletion exercises/comparing_fractions_1.html
Expand Up @@ -98,7 +98,7 @@
<div class="hints">
<div>
<p>This is like considering two equally sized pizzas that have been cut into <var>DEN_1</var> equal slices.</p>
<p>Since both pizzas have the same number of slices, all the slice are the same size.</p>
<p>Since both pizzas have the same number of slices, all the slices are the same size.</p>
<div style="height: 150px;">
<div class="graphie" style="float: left">
init({ range: [ [-3, 3], [-3, 3] ], scale: 25 });
Expand Down
2 changes: 1 addition & 1 deletion exercises/dependent_probability.html
Expand Up @@ -96,7 +96,7 @@

<div class="hints">
<!-- hint indicating different coin types -->
<p>You can only possibly pick a fair coin or pick an unfair coin. There is no other outcome.</p>
<p>You can only pick a fair coin or pick an unfair coin. There is no other outcome.</p>

<!-- hint questioning coin type selection chances -->
<p>What chance do you have of picking an unfair coin? How about a fair coin?</p>
Expand Down
2 changes: 1 addition & 1 deletion exercises/equation_of_a_circle_2.html
Expand Up @@ -36,7 +36,7 @@
F === 0 ? null : F
])</var> = 0</code>.</p>

<p>What are its center <code>(h, k)</code> and its radius <code>r</code>?</p>
<p>What is its center <code>(h, k)</code> and its radius <code>r</code>?</p>

</div>

Expand Down
8 changes: 4 additions & 4 deletions exercises/equivalent_fractions_2.html
Expand Up @@ -22,7 +22,7 @@
</div>
<div class="solution"><var>D</var></div>
<div class="hints">
<p>To get the right numerator <code><var>C</var></code>, the left numerator <code><var>A</var></code> was multiplied by <code><var>M</var></code>.</p>
<p>To get the right numerator <code><var>C</var></code>, the left numerator <code><var>A</var></code> is multiplied by <code><var>M</var></code>.</p>
<p>To find the right denominator, multiply the left denominator by <code><var>M</var></code> as well.</p>
<p><code><var>B</var> \times <var>M</var> = <var>D</var></code></p>
</div>
Expand All @@ -34,7 +34,7 @@
</div>
<div class="solution"><var>C</var></div>
<div class="hints">
<p>To get the right denominator <code><var>D</var></code>, the left denominator <code><var>B</var></code> was multiplied by <code><var>M</var></code>.</p>
<p>To get the right denominator <code><var>D</var></code>, the left denominator <code><var>B</var></code> is multiplied by <code><var>M</var></code>.</p>
<p>To find the right numerator, multiply the left numerator by <code><var>M</var></code> as well.</p>
<p><code><var>A</var> \times <var>M</var> = <var>C</var></code></p>
</div>
Expand All @@ -46,7 +46,7 @@
</div>
<div class="solution"><var>B</var></div>
<div class="hints">
<p>To get the right numerator <code><var>A</var></code>, the left numerator <code><var>C</var></code> was divided by <code><var>M</var></code>.</p>
<p>To get the right numerator <code><var>A</var></code>, the left numerator <code><var>C</var></code> is divided by <code><var>M</var></code>.</p>
<p>To find the right denominator, divide the left denominator by <code><var>M</var></code> as well.</p>
<p><code><var>D</var> \div <var>M</var> = <var>B</var></code></p>
</div>
Expand All @@ -58,7 +58,7 @@
</div>
<div class="solution"><var>A</var></div>
<div class="hints">
<p>To get the right denominator <code><var>B</var></code>, the left denominator <code><var>D</var></code> was divided by <code><var>M</var></code>.</p>
<p>To get the right denominator <code><var>B</var></code>, the left denominator <code><var>D</var></code> is divided by <code><var>M</var></code>.</p>
<p>To find the right numerator, divide the left numerator by <code><var>M</var></code> as well.</p>
<p><code><var>C</var> \div <var>M</var> = <var>A</var></code></p>
</div>
Expand Down
8 changes: 4 additions & 4 deletions exercises/graphs_of_sine_and_cosine.html
Expand Up @@ -94,15 +94,15 @@

<p>The function starts at its maximum value (ie, <code>f(0)=<var>VSCALE</var></code>), so what kind of function is it?</p>

<p>The cosine function, <code>\cos(x)</code> starts at 1 (ie, <code>\cos(0)=1</code>), so <code>f(x)</code> must be a scaled version of the cosine function.</p>
<p>The cosine function, <code>\cos(x)</code>, starts at 1 (ie, <code>\cos(0)=1</code>), so <code>f(x)</code> must be a scaled version of the cosine function.</p>

</div>

<div data-else data-unwrap>

<p>The function starts at zero (ie, <code>f(0)=0</code>), so what kind of function is it?</p>

<p>The sine function, <code>\sin(x)</code> starts at 0 (ie, <code>\sin(0)=0</code>), so <code>f(x)</code> must be a scaled version of the sine function.</p>
<p>The sine function, <code>\sin(x)</code>, starts at 0 (ie, <code>\sin(0)=0</code>), so <code>f(x)</code> must be a scaled version of the sine function.</p>

</div>

Expand All @@ -123,14 +123,14 @@
</div>

<div data-if="abs( PERIOD - 2 * PI ) < 0.01" data-unwrap>
<p>The period of a normal <var>FNS</var> function is <code>2\pi</code>, and the period we want is <code><var>piFraction( PERIOD )</var></code>, so we don't need to worry about scaling the function horizantally.</p>
<p>The period of a normal <var>FNS</var> function is <code>2\pi</code>, and the period we want is <code><var>piFraction( PERIOD )</var></code>, so we don't need to worry about scaling the function horizontally.</p>
</div>

<div data-else data-unwrap>

<p>The period of a normal <var>FNS</var> function is <code>2\pi</code>, and the period we want is <code><var>piFraction( PERIOD )</var></code>, so we need to scale the <var>FNS</var> function horizontally by <code><var>decFrac( PERIOD / 2 / PI )</var></code>.</p>

<p>To horizontally scale <code>\<var>FN</var>(x)</code> by <code><var>decFrac( PERIOD / 2 / PI )</var></code>, we need to subsitute <code><var>decFrac( 2 * PI / PERIOD )</var>x</code> in for <code>x</code> to get <code>\<var>FN</var>(<var>decFrac( 2 * PI / PERIOD )</var>x)</code>.</p>
<p>To horizontally scale <code>\<var>FN</var>(x)</code> by <code><var>decFrac( PERIOD / 2 / PI )</var></code>, we need to substitute <code><var>decFrac( 2 * PI / PERIOD )</var>x</code> in for <code>x</code> to get <code>\<var>FN</var>(<var>decFrac( 2 * PI / PERIOD )</var>x)</code>.</p>

</div>

Expand Down
4 changes: 2 additions & 2 deletions exercises/prime_factorization.html
Expand Up @@ -17,7 +17,7 @@
<var id="NUMBER">getPrime()</var>
</div>
<p class="question">What is the prime factorization of <code><var>NUMBER</var></code>?</p>
<p>Type each prime factor separated by an x, like this: 2 x 3.</p>
<p>Type each prime factor separated by an x (as in the letter), like this: 2 x 3.</p>
<p class="solution"><var>NUMBER</var></p>
<div class="hints">
<p>Let us draw a factor tree.</p>
Expand Down Expand Up @@ -48,7 +48,7 @@
</div>

<p class="question">What is the prime factorization of <code><var>NUMBER</var></code>?</p>
<p>Type each prime factor separated by an x, like this: 2 x 3.</p>
<p>Type each prime factor separated by an x (as in the letter), like this: 2 x 3.</p>
<p class="solution" data-type="primeFactorization"><var>SOLUTION.join("x")</var></p>

<div class="hints">
Expand Down
2 changes: 1 addition & 1 deletion exercises/solid_geometry.html
Expand Up @@ -29,7 +29,7 @@
<p class="solution"><var>s * s * s</var></p>

<div class="hints">
<p>The volume of a cube with side <code>s</code> is <code>V = s^3</code>.</p>
<p>The volume of a cube with side length <code>s</code> is <code>V = s^3</code>.</p>
<p><code>\qquad V = <var>s</var>^3</code></p>
<p><code>\qquad \hphantom{V} = <var>s</var> \cdot <var>s</var> \cdot <var>s</var></code></p>
<p><code>\qquad \hphantom{V} = <var>s * s * s</var></code></p>
Expand Down
4 changes: 2 additions & 2 deletions exercises/solving_for_a_variable.html
Expand Up @@ -296,7 +296,7 @@
<p><code><var>X</var> = \dfrac{ <var>plus( (E*C)+Z, (-B*F)+Y )</var> }{ <var>color( A*F-D*C, false )</var> }</code></p>

<div data-if="GCD > 1 || (A*F-D*C) < 0" data-unwrap>
<p data-if="GCD > 1">All of these terms are divisable by <code><var>GCD</var></code>.</p>
<p data-if="GCD > 1">All of these terms are divisible by <code><var>GCD</var></code>.</p>
<p data-if="GCD > 1 && (A*F-D*C) < 0">Divide by the common factor and swap signs so the denominator isn't negative.</p>
<p data-else-if="GCD > 1">Divide by the common factor.</p>
<p data-else>Swap signs so the denominator isn't negative.</p>
Expand All @@ -312,4 +312,4 @@
</div>
</div>
</body>
</html>
</html>
5 changes: 4 additions & 1 deletion khan-exercise.js
Expand Up @@ -36,7 +36,10 @@ var primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43,
},

// Check to see if we're in test mode
testMode = (window.location.host.indexOf("localhost") === 0 || window.location.protocol === "file:") && /\.html$/.test( window.location.pathname ),
testMode = (window.location.host.indexOf("localhost") === 0 ||
window.location.host.indexOf("127.0.0.1") === 0 ||
window.location.protocol === "file:") &&
/\.html$/.test( window.location.pathname ),

// Check to see if we're in beta mode
betaMode = window.location.host.indexOf( "khan-masterslave" ) !== -1,
Expand Down

0 comments on commit d89d39c

Please sign in to comment.