Skip to content
Browse files

Fix a bunch of missing variables, like in equation of a line

(Oops.)
  • Loading branch information...
1 parent a7bd4bd commit bd44359201c205cefc1d46387af887c22e9a509d @spicyj spicyj committed Jun 28, 2011
View
12 exercises/adding_decimals.html
@@ -38,14 +38,14 @@
<p data-else><code><var>A_ARRAY[2]</var> + <var>B_ARRAY[2]</var> = <var>A_ARRAY[2] + B_ARRAY[2]</var></code></p>
<p data-if="ADDITION_TABLE[3] && ( A_ARRAY[3] || B_ARRAY[3] )">carry <code><var>ADDITION_TABLE[3]</var></code></p>
<!-- fourth addition -->
- <p data-if="ADDITION_TABLE[3] && _ARRAY[3] && _ARRAY[3]"><code><var>A_ARRAY[3]</var> + <var>B_ARRAY[3]</var> + <var>ADDITION_TABLE[3]</var> = <var>A_ARRAY[3] + B_ARRAY[3] + ADDITION_TABLE[3]</var></code></p>
- <p data-if="!ADDITION_TABLE[3] && _ARRAY[3] && _ARRAY[3]"><code><var>A_ARRAY[3]</var> + <var>B_ARRAY[3]</var> = <var>A_ARRAY[3] + B_ARRAY[3]</var></code></p>
- <p data-if="ADDITION_TABLE[3] && _ARRAY[3] && !B_ARRAY[3]"><code><var>A_ARRAY[3]</var> + <var>ADDITION_TABLE[3]</var> = <var>A_ARRAY[3] + ADDITION_TABLE[3]</var></code></p>
- <p data-if="ADDITION_TABLE[3] && !A_ARRAY[3] && _ARRAY[3]"><code><var>B_ARRAY[3]</var> + <var>ADDITION_TABLE[3]</var> = <var>B_ARRAY[3] + ADDITION_TABLE[3]</var></code></p>
+ <p data-if="ADDITION_TABLE[3] && A_ARRAY[3] && B_ARRAY[3]"><code><var>A_ARRAY[3]</var> + <var>B_ARRAY[3]</var> + <var>ADDITION_TABLE[3]</var> = <var>A_ARRAY[3] + B_ARRAY[3] + ADDITION_TABLE[3]</var></code></p>
+ <p data-if="!ADDITION_TABLE[3] && A_ARRAY[3] && B_ARRAY[3]"><code><var>A_ARRAY[3]</var> + <var>B_ARRAY[3]</var> = <var>A_ARRAY[3] + B_ARRAY[3]</var></code></p>
+ <p data-if="ADDITION_TABLE[3] && A_ARRAY[3] && !B_ARRAY[3]"><code><var>A_ARRAY[3]</var> + <var>ADDITION_TABLE[3]</var> = <var>A_ARRAY[3] + ADDITION_TABLE[3]</var></code></p>
+ <p data-if="ADDITION_TABLE[3] && !A_ARRAY[3] && B_ARRAY[3]"><code><var>B_ARRAY[3]</var> + <var>ADDITION_TABLE[3]</var> = <var>B_ARRAY[3] + ADDITION_TABLE[3]</var></code></p>
<p data-if="ADDITION_TABLE[4] && ( A_ARRAY[4] || B_ARRAY[4] )">carry <code><var>ADDITION_TABLE[4]</var></code></p>
<!-- fourth addition -->
- <p data-if="ADDITION_TABLE[3] && _ARRAY[4] && _ARRAY[4]"><code><var>A_ARRAY[4]</var> + <var>B_ARRAY[4]</var> + <var>ADDITION_TABLE[4]</var> = <var>A_ARRAY[4] + B_ARRAY[4] + ADDITION_TABLE[4]</var></code></p>
- <p data-if="!ADDITION_TABLE[3] && _ARRAY[4] && _ARRAY[4]"><code><var>A_ARRAY[4]</var> + <var>B_ARRAY[4]</var> = <var>A_ARRAY[4] + B_ARRAY[4]</var></code></p>
+ <p data-if="ADDITION_TABLE[3] && A_ARRAY[4] && B_ARRAY[4]"><code><var>A_ARRAY[4]</var> + <var>B_ARRAY[4]</var> + <var>ADDITION_TABLE[4]</var> = <var>A_ARRAY[4] + B_ARRAY[4] + ADDITION_TABLE[4]</var></code></p>
+ <p data-if="!ADDITION_TABLE[3] && A_ARRAY[4] && B_ARRAY[4]"><code><var>A_ARRAY[4]</var> + <var>B_ARRAY[4]</var> = <var>A_ARRAY[4] + B_ARRAY[4]</var></code></p>
<p>Pull down the rest</p>
<p>The final result is <code><var>A+B</var></code></p>
</div>
View
2 exercises/age_word_problems.html
@@ -162,7 +162,7 @@
</div>
<div id="solve-single-5" data-weight="2">
- <div class="vars" data-ensure="A <= 80 && >= 2">
+ <div class="vars" data-ensure="A <= 80 && B >= 2">
<var id="C">randRange(3, 5)</var>
<var id="B">randRange(1, 10) * (C - 1)</var>
<var id="A">randRange(C * B + 1, 15) * (C - 1)</var>
View
2 exercises/arithmetic_word_problems.html
@@ -101,7 +101,7 @@
<div>
- <div class="vars" data-ensure="!isPrime( TOTAL_ITEMS ) && EW_ITEMS !== ITEMS">
+ <div class="vars" data-ensure="!isPrime( TOTAL_ITEMS ) && NEW_ITEMS !== ITEMS">
<var id="TOTAL_ITEMS">randRange( 10, 99 )</var>
<var id="ITEMS">getNontrivialFactor( TOTAL_ITEMS )</var>
<var id="GROUPS">TOTAL_ITEMS / ITEMS</var>
View
2 exercises/comparing_fractions_2.html
@@ -12,7 +12,7 @@
-->
<div class="problems">
<div id="original">
- <div class="vars" data-ensure="NUM_1 !== NUM_2 && EN_1 !== DEN_2">
+ <div class="vars" data-ensure="NUM_1 !== NUM_2 && DEN_1 !== DEN_2">
<var id="FACTOR">randRange( 2, 3 )</var>
<var id="NUM_1">randRange( 1, 14 )</var>
<var id="NUM_2">randRange( 1, 14 )</var>
View
2 exercises/dividing_fractions.html
@@ -6,7 +6,7 @@
</head>
<body>
<div class="exercise">
- <div class="vars" data-ensure="getGCD(A, B) === 1 && etGCD(C, D) === 1">
+ <div class="vars" data-ensure="getGCD(A, B) === 1 && getGCD(C, D) === 1">
<var id="NEG1">randFromArray([1, -1])</var>
<var id="NEG1S">NEG1 === -1 ? "-" : ""</var>
<var id="A">randRange(1, 9)</var>
View
2 exercises/divisibility_intro.html
@@ -18,7 +18,7 @@
num_factors = round( factorization.length / 2 ),
answer = 1;
- for (var i = 0; i &lt; num_factors && actorization.length; i++) {
+ for (var i = 0; i &lt; num_factors && factorization.length; i++) {
var index = floor( random() * factorization.length );
answer *= factorization[index];
factorization = jQuery.merge( factorization.slice(0, index), factorization.slice(index + 1) );
View
2 exercises/equation_of_a_line.html
@@ -6,7 +6,7 @@
</head>
<body>
<div class="exercise">
- <div class="vars" data-ensure="Math.pow(Y1 - Y2, 2) + Math.pow(X1 - X2, 2) < 36 && 1 < X2 && -10 <= B && <= 10">
+ <div class="vars" data-ensure="Math.pow(Y1 - Y2, 2) + Math.pow(X1 - X2, 2) < 36 && X1 < X2 && -10 <= B && B <= 10">
<var id="X1">randRange(-9, 9)</var>
<var id="Y1">randRange(-9, 9)</var>
View
2 exercises/exponents_1.html
@@ -61,7 +61,7 @@
<var id="NEG_ONE_HINT">BASE > 0 ? "" : ( isEven( EXP ) ? "even" : "odd" )</var>
<var id="HINT1">EXP === 0</var>
- <var id="HINT2">!HINT1 && XP === 1</var>
+ <var id="HINT2">!HINT1 && EXP === 1</var>
<var id="HINT3">!HINT1 && !HINT2 && ( BASE === 0 || BASE === 1 || BASE === -1 )</var>
<var id="HINT4">!HINT1 && !HINT2 && !HINT3</var>
</div>
View
2 exercises/exponents_2.html
@@ -67,7 +67,7 @@
<div class="hints">
<!-- FIXME: could be made nicer with ifs that unwrap -->
- <p data-if="abs( EXP ) > 1 && XP_NEG"><code>= <var>fracParens( BASEF_N, BASEF_D )</var>^{<var>EXP</var>}</code></p>
+ <p data-if="abs( EXP ) > 1 && EXP_NEG"><code>= <var>fracParens( BASEF_N, BASEF_D )</var>^{<var>EXP</var>}</code></p>
<p data-if="abs( EXP ) > 1" data-each="expandFractionExponent( BASEF_N, BASEF_D, EXP ) as v"><code>= <var>v</var></code></p>
<p data-else><code>= <var>frac( SOL_N, SOL_D )</var></code></p>
</div>
View
4 exercises/exponents_4.html
@@ -46,7 +46,7 @@
<var id="ROOT_N">round( pow( EXP_NEG ? BASE_D : BASE_N, 1 / EXP_D ) )</var>
<var id="ROOT_D">round( pow( EXP_NEG ? BASE_N : BASE_D, 1 / EXP_D ) )</var>
- <var id="SOL_NEG">ROOT_NEG && sOdd( EXP_N )</var>
+ <var id="SOL_NEG">ROOT_NEG && isOdd( EXP_N )</var>
<var id="SOL_N">round( pow( ROOT_N, EXP_N ) )</var>
<var id="SOL_D">round( pow( ROOT_D, EXP_N ) )</var>
</div>
@@ -75,7 +75,7 @@
<!-- "So (4/9)^(3/2)=((4/9)^(1/2))^3=(2/3)^3" -->
<p data-if="EXP_N > 1">So <code><var>fracParens( BASEF_N, BASEF_D )</var>^{<var>fracSmall( EXP_N, EXP_D )</var>}=\left(<var>fracParens( BASEF_N, BASEF_D )</var>^{<var>fracSmall( 1, EXP_D )</var>}\right)^{<var>EXP_N</var>}=<var>fracParens( ROOT_N, ROOT_D )</var>^{<var>EXP_N</var>}</code></p>
- <p data-if="EXP_N > 1 && educes( ROOT_N, ROOT_D )"><code>= <var>fraction( ROOT_N, ROOT_D, true, true, false, true )</var>^{<var>EXP_N</var>}</code></p>
+ <p data-if="EXP_N > 1 && reduces( ROOT_N, ROOT_D )"><code>= <var>fraction( ROOT_N, ROOT_D, true, true, false, true )</var>^{<var>EXP_N</var>}</code></p>
<!-- "=(2/3)(2/3)(2/3)" -->
<p data-if="EXP_N > 1" data-each="expandFractionExponent( ROOT_N, ROOT_D, EXP_N ) as v"><code>= <var>v</var></code></p>
View
8 exercises/functions_1.html
@@ -18,16 +18,16 @@
functionPath.push([ -11, randRange( -5, 5 ) ]);
for( var i = -10; i < 11; i++ ) {
- if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && unctionPath[i+10][1] < 8 ) {
+ if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && functionPath[i+10][1] < 8 ) {
functionPath.push([i, functionPath[i+10][1]+1]);
- } else if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && unctionPath[i+10][1] > -8 ) {
+ } else if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && functionPath[i+10][1] > -8 ) {
functionPath.push([i, functionPath[i+10][1]-1]);
- } else if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && unctionPath[i+10][1] < 7 ) {
+ } else if ( abs( randRangeNonZero( -10, 10 ) < 2 ) && functionPath[i+10][1] < 7 ) {
functionPath.push([i, functionPath[i+10][1]+2]);
- } else if ( abs( randRangeNonZero( -10, 10 ) < 3 ) && unctionPath[i+10][1] > -7 ) {
+ } else if ( abs( randRangeNonZero( -10, 10 ) < 3 ) && functionPath[i+10][1] > -7 ) {
functionPath.push([i, functionPath[i+10][1]-2]);
} else {
View
16 exercises/functions_2.html
@@ -24,16 +24,16 @@
functionPath.push([-11, currentY]);
for( var i = -10; i < 11; i++ ) {
- if (Math.abs( randRangeNonZero( -10, 10 ) < 2 ) && unctionPath[i+10][1] < 8 ) {
+ if (Math.abs( randRangeNonZero( -10, 10 ) < 2 ) && functionPath[i+10][1] < 8 ) {
functionPath.push([ i, functionPath[i+10][1]+1 ]);
- } else if (Math.abs( randRangeNonZero( -10, 10 ) < 2 ) && unctionPath[i+10][1] > -8 ) {
+ } else if (Math.abs( randRangeNonZero( -10, 10 ) < 2 ) && functionPath[i+10][1] > -8 ) {
functionPath.push([ i, functionPath[i+10][1]-1 ]);
- } else if (Math.abs( randRangeNonZero( -10, 10 ) < 2 ) && unctionPath[i+10][1] < 7 ) {
+ } else if (Math.abs( randRangeNonZero( -10, 10 ) < 2 ) && functionPath[i+10][1] < 7 ) {
functionPath.push([ i, functionPath[i+10][1]+2 ]);
- } else if (Math.abs( randRangeNonZero( -10, 10 ) < 3 ) && unctionPath[i+10][1] > -7 ) {
+ } else if (Math.abs( randRangeNonZero( -10, 10 ) < 3 ) && functionPath[i+10][1] > -7 ) {
functionPath.push([ i, functionPath[i+10][1]-2 ]);
} else {
@@ -51,16 +51,16 @@
gPath.push([-11, gY]);
for( var i = -10; i < 11; i++ ) {
- if (Math.abs( randRangeNonZero( -10, 10 ) < 2 ) && Path[i+10][1] < 8 ) {
+ if (Math.abs( randRangeNonZero( -10, 10 ) < 2 ) && gPath[i+10][1] < 8 ) {
gPath.push([i, gPath[i+10][1]+1]);
- } else if (Math.abs( randRangeNonZero( -10, 10 ) < 3 ) && Path[i+10][1] > -8 ) {
+ } else if (Math.abs( randRangeNonZero( -10, 10 ) < 3 ) && gPath[i+10][1] > -8 ) {
gPath.push([i, gPath[i+10][1]-1]);
- } else if (Math.abs( randRangeNonZero( -10, 10 ) < 2 ) && Path[i+10][1] < 7 ) {
+ } else if (Math.abs( randRangeNonZero( -10, 10 ) < 2 ) && gPath[i+10][1] < 7 ) {
gPath.push([i, gPath[i+10][1]+2]);
- } else if (Math.abs( randRangeNonZero( -10, 10 ) < 3 ) && Path[i+10][1] > -7 ) {
+ } else if (Math.abs( randRangeNonZero( -10, 10 ) < 3 ) && gPath[i+10][1] > -7 ) {
gPath.push([i, gPath[i+10][1]-2]);
} else {
View
4 exercises/functions_3.html
@@ -6,7 +6,7 @@
</head>
<body>
<div class="exercise">
- <div class="vars" data-ensure="INNER.name !== OUTER.name && NNER.minDegree <= INNER.maxDegree && UTER.minDegree <= OUTER.maxDegree">
+ <div class="vars" data-ensure="INNER.name !== OUTER.name && INNER.minDegree <= INNER.maxDegree && OUTER.minDegree <= OUTER.maxDegree">
<var id="FUNC_NAMES">["f", "g", "h"]</var>
<var id="FUNC_VARIABLES">["x", "n", "t"]</var>
@@ -42,7 +42,7 @@
</div>
<div>
- <div class="vars" data-ensure="OUTER2.name !== INNER.name && UTER2.name !== OUTER.name && UTER2.minDegree <= OUTER2.maxDegree">
+ <div class="vars" data-ensure="OUTER2.name !== INNER.name && OUTER2.name !== OUTER.name && OUTER2.minDegree <= OUTER2.maxDegree">
<var id="OUTER2">new CompositePolynomial( randRange(0, 2), randRange(1, 3), null, randFromArray(FUNC_VARIABLES), randFromArray(FUNC_NAMES), randFromArray([INNER, OUTER]) )</var>
<var id="FUNCTIONS">shuffle([INNER, OUTER, OUTER2])</var>
View
2 exercises/graphing_points.html
@@ -15,7 +15,7 @@
var point = [ randRange( -9, 9 ), randRange( -9, 9 ) ];
var isUnique = true;
jQuery.each( points, function( index, pt ) {
- if ( point[0] === pt[0] && oint[1] === pt[1] ) {
+ if ( point[0] === pt[0] && point[1] === pt[1] ) {
isUnique = false;
return false;
}
View
4 exercises/limits_1.html
@@ -99,8 +99,8 @@
\lim_{x\to<var>a</var>} f(x) & \\
\text{where} \quad f(x) & = \left \{
\begin{array}{1 1}
- <var>d_line</var> & \quad \text{if} \quad x \neq <var>a</var>\\
- <var>d_cons</var> & \quad \text{if} \quad x = <var>a</var>\\
+ <var>d_line</var> &\quad \text{if} \quad x \neq <var>a</var>\\
+ <var>d_cons</var> &\quad \text{if} \quad x = <var>a</var>\\
\end{array} \right.
\end{align*}</code></p>
<div class="graph" style="width: 400px; height: 400px;" data-style="font-size: 15px; font-family: sans-serif; font-style: bold; stroke: blue;" data-graph-type="plane">
View
2 exercises/line_graph_intuition.html
@@ -50,7 +50,7 @@
</head>
<body>
<div class="exercise">
- <div class="vars" data-ensure="X1 !== X2 && !(M === 1 && === 0)">
+ <div class="vars" data-ensure="X1 !== X2 && !(M === 1 && B === 0)">
<var id="X1">randRange( -8, 8 )</var>
<var id="X2">randRange( -8, 8 )</var>
<var id="Y1">randRange( -8, 8 )</var>
View
2 exercises/line_relationships.html
@@ -8,7 +8,7 @@
<div class="exercise">
<div class="problems">
<div id="different-lines">
- <div class="vars" data-ensure="A1 / B1 !== A2 / B2 && 1 / B1 !== -A2 / B2">
+ <div class="vars" data-ensure="A1 / B1 !== A2 / B2 && A1 / B1 !== -A2 / B2">
<var id="A1">randRangeNonZero( -5, 5 )</var>
<var id="A2">randRangeNonZero( -5, 5 )</var>
<var id="B1">randRangeNonZero( -5, 5 )</var>
View
2 exercises/midpoint_formula.html
@@ -20,7 +20,7 @@
</head>
<body>
<div class="exercise">
- <div class="vars" data-ensure="X1 != Y1 && 2 != Y2">
+ <div class="vars" data-ensure="X1 != Y1 && X2 != Y2">
<var id="X1">randRange( -9, 7 )</var>
<var id="X2">randRange( -9, 7 )</var>
<var id="Y1">randRange( -9, 8 )</var>
View
12 exercises/multiplication_4.html
@@ -67,15 +67,15 @@
<p data-if="ADDITION_TABLE[3]">carry <var>ADDITION_TABLE[3]</var></p>
<!-- fourth addition -->
<!-- there is a fourth digit in DIGITS-->
- <p data-if="DIGITS[3] && DDITION_TABLE[3]"><var>DIGITS[3]</var> + <var>EX_DIGITS2[3]</var> + <var>ADDITION_TABLE[3]</var> = <var>DIGITS[3] + EX_DIGITS2[3] + ADDITION_TABLE[3]</var></p>
+ <p data-if="DIGITS[3] && ADDITION_TABLE[3]"><var>DIGITS[3]</var> + <var>EX_DIGITS2[3]</var> + <var>ADDITION_TABLE[3]</var> = <var>DIGITS[3] + EX_DIGITS2[3] + ADDITION_TABLE[3]</var></p>
<p data-else data-if="DIGITS[3]"><var>DIGITS[3]</var> + <var>EX_DIGITS2[3]</var> = <var>DIGITS[3] + EX_DIGITS2[3]</var></p>
- <p data-if="DIGITS[3] && DDITION_TABLE[4] && X_DIGITS2[4]">carry <var>ADDITION_TABLE[4]</var></p>
- <p data-if="DIGITS[3] && DDITION_TABLE[4] && X_DIGITS2[4]"><var>ADDITION_TABLE[4]</var> + <var>EX_DIGITS2[4]</var> = <var>EX_DIGITS2[4] + ADDITION_TABLE[4]</var></p>
- <p data-if="DIGITS[3] && !ADDITION_TABLE[4] && X_DIGITS2[4]">pull down <var>EX_DIGITS2[4]</var></p>
+ <p data-if="DIGITS[3] && ADDITION_TABLE[4] && EX_DIGITS2[4]">carry <var>ADDITION_TABLE[4]</var></p>
+ <p data-if="DIGITS[3] && ADDITION_TABLE[4] && EX_DIGITS2[4]"><var>ADDITION_TABLE[4]</var> + <var>EX_DIGITS2[4]</var> = <var>EX_DIGITS2[4] + ADDITION_TABLE[4]</var></p>
+ <p data-if="DIGITS[3] && !ADDITION_TABLE[4] && EX_DIGITS2[4]">pull down <var>EX_DIGITS2[4]</var></p>
<!-- there is no fourth digit in DIGITS-->
- <p data-if="!DIGITS[3] && DDITION_TABLE[3]"><var>EX_DIGITS2[3]</var> + <var>ADDITION_TABLE[3]</var> = <var>EX_DIGITS2[3] + ADDITION_TABLE[3]</var></p>
+ <p data-if="!DIGITS[3] && ADDITION_TABLE[3]"><var>EX_DIGITS2[3]</var> + <var>ADDITION_TABLE[3]</var> = <var>EX_DIGITS2[3] + ADDITION_TABLE[3]</var></p>
<p data-if="!DIGITS[3] && !ADDITION_TABLE[3]">pull down <var>EX_DIGITS2[4]</var><var>EX_DIGITS2[3]</var></p>
- <p data-if="!DIGITS[3] && DDITION_TABLE[3] && X_DIGITS2[4]">pull down <var>EX_DIGITS2[4]</var></p>
+ <p data-if="!DIGITS[3] && ADDITION_TABLE[3] && EX_DIGITS2[4]">pull down <var>EX_DIGITS2[4]</var></p>
<p>The final result is <var>A*B</var></p>
</div>
</div>
View
6 exercises/multiplying_and_dividing_negative_numbers.html
@@ -6,7 +6,7 @@
</head>
<body>
<div class="exercise">
- <div class="vars" data-ensure="(A < 0 || B < 0) && != 0">
+ <div class="vars" data-ensure="(A < 0 || B < 0) && B != 0">
<var id="A">rand( 18 ) - 9</var>
<var id="B">rand( 18 ) - 9</var>
<var id="C">A * B</var>
@@ -17,7 +17,7 @@
<p class="question"><code><var>A</var> \times <var>B</var> = </code> ?</p>
<div class="solution"><var>C</var></div>
<div class="hints">
- <p data-if="A < 0 && < 0">A negative times a negative is a positive.</p>
+ <p data-if="A < 0 && B < 0">A negative times a negative is a positive.</p>
<p data-else data-if="A < 0">A negative times a positive is a negative.</p>
<p data-else>A positive times a negative is a negative.</p>
<p><code><var>A</var> \times <var>B</var> = <var>C</var></code></p>
@@ -28,7 +28,7 @@
<p class="question"><code><var>C</var> \div <var>B</var> = </code> ?</p>
<div class="solution"><var>A</var></div>
<div class="hints">
- <p data-if="C < 0 && < 0">A negative divided by a negative is a positive.</p>
+ <p data-if="C < 0 && B < 0">A negative divided by a negative is a positive.</p>
<p data-else data-if="C < 0">A negative divided by a positive is a negative.</p>
<p data-else>A positive divided by a negative is a negative.</p>
<p><code><var>C</var> \div <var>B</var> = <var>A</var></code></p>
View
20 exercises/multiplying_decimals.html
@@ -87,24 +87,24 @@
<p data-if="ADDITION_TABLE[3]">carry <var>ADDITION_TABLE[3]</var></p>
<!-- fourth addition -->
<!-- there is a fourth digit in DIGITS-->
- <p data-if="DIGITS[3] && DDITION_TABLE[3]"><var>DIGITS[3]</var> + <var>EX_DIGITS2[3]</var> + <var>EX_DIGITS3[3]</var> + <var>ADDITION_TABLE[3]</var> = <var>DIGITS[3] + EX_DIGITS2[3] + EX_DIGITS3[3] + ADDITION_TABLE[3]</var></p>
+ <p data-if="DIGITS[3] && ADDITION_TABLE[3]"><var>DIGITS[3]</var> + <var>EX_DIGITS2[3]</var> + <var>EX_DIGITS3[3]</var> + <var>ADDITION_TABLE[3]</var> = <var>DIGITS[3] + EX_DIGITS2[3] + EX_DIGITS3[3] + ADDITION_TABLE[3]</var></p>
<p data-if="DIGITS[3] && !ADDITION_TABLE[3]"><var>DIGITS[3]</var> + <var>EX_DIGITS2[3]</var> + <var>EX_DIGITS3[3]</var> = <var>DIGITS[3] + EX_DIGITS2[3] + EX_DIGITS3[3]</var></p>
- <p data-if="DIGITS[3] && DDITION_TABLE[4]">carry <var>ADDITION_TABLE[4]</var></p>
+ <p data-if="DIGITS[3] && ADDITION_TABLE[4]">carry <var>ADDITION_TABLE[4]</var></p>
<!-- there is no fourth digit in DIGITS-->
- <p data-if="!DIGITS[3] && DDITION_TABLE[3]"><var>EX_DIGITS2[3]</var> + <var>EX_DIGITS3[3]</var> + <var>ADDITION_TABLE[3]</var> = <var>EX_DIGITS2[3] + EX_DIGITS3[3] + ADDITION_TABLE[3]</var></p>
+ <p data-if="!DIGITS[3] && ADDITION_TABLE[3]"><var>EX_DIGITS2[3]</var> + <var>EX_DIGITS3[3]</var> + <var>ADDITION_TABLE[3]</var> = <var>EX_DIGITS2[3] + EX_DIGITS3[3] + ADDITION_TABLE[3]</var></p>
<p data-if="!DIGITS[3] && !ADDITION_TABLE[3]"><var>EX_DIGITS2[3]</var> + <var>EX_DIGITS3[3]</var> = <var>EX_DIGITS2[3] + EX_DIGITS3[3]</var></p>
- <p data-if="!DIGITS[3] && DDITION_TABLE[4]">carry <var>ADDITION_TABLE[4]</var></p>
+ <p data-if="!DIGITS[3] && ADDITION_TABLE[4]">carry <var>ADDITION_TABLE[4]</var></p>
<!-- fifth addition -->
<!-- there is a fifth digit in EX_DIGITS2-->
- <p data-if="EX_DIGITS2[4] && DDITION_TABLE[4]"><var>EX_DIGITS2[4]</var> + <var>EX_DIGITS3[4]</var> + <var>ADDITION_TABLE[4]</var> = <var>EX_DIGITS2[4] + EX_DIGITS3[4] + ADDITION_TABLE[4]</var></p>
+ <p data-if="EX_DIGITS2[4] && ADDITION_TABLE[4]"><var>EX_DIGITS2[4]</var> + <var>EX_DIGITS3[4]</var> + <var>ADDITION_TABLE[4]</var> = <var>EX_DIGITS2[4] + EX_DIGITS3[4] + ADDITION_TABLE[4]</var></p>
<p data-else data-if="EX_DIGITS2[4]"><var>EX_DIGITS2[4]</var> + <var>EX_DIGITS3[4]</var> = <var>EX_DIGITS2[4] + EX_DIGITS3[4]</var></p>
- <p data-if="EX_DIGITS2[4] && DDITION_TABLE[5] && X_DIGITS3[5]">carry <var>ADDITION_TABLE[5]</var></p>
- <p data-if="EX_DIGITS2[4] && DDITION_TABLE[5] && X_DIGITS3[5]"><var>ADDITION_TABLE[5]</var> + <var>EX_DIGITS3[5]</var> = <var>EX_DIGITS3[5] + ADDITION_TABLE[5]</var></p>
- <p data-if="EX_DIGITS2[4] && !ADDITION_TABLE[5] && X_DIGITS3[5]">pull down <var>EX_DIGITS3[5]</var></p>
+ <p data-if="EX_DIGITS2[4] && ADDITION_TABLE[5] && EX_DIGITS3[5]">carry <var>ADDITION_TABLE[5]</var></p>
+ <p data-if="EX_DIGITS2[4] && ADDITION_TABLE[5] && EX_DIGITS3[5]"><var>ADDITION_TABLE[5]</var> + <var>EX_DIGITS3[5]</var> = <var>EX_DIGITS3[5] + ADDITION_TABLE[5]</var></p>
+ <p data-if="EX_DIGITS2[4] && !ADDITION_TABLE[5] && EX_DIGITS3[5]">pull down <var>EX_DIGITS3[5]</var></p>
<!-- there is no fifth digit in EX_DIGITS2-->
- <p data-if="!EX_DIGITS2[4] && DDITION_TABLE[4]"><var>EX_DIGITS3[4]</var> + <var>ADDITION_TABLE[4]</var> = <var>EX_DIGITS3[4] + ADDITION_TABLE[4]</var></p>
+ <p data-if="!EX_DIGITS2[4] && ADDITION_TABLE[4]"><var>EX_DIGITS3[4]</var> + <var>ADDITION_TABLE[4]</var> = <var>EX_DIGITS3[4] + ADDITION_TABLE[4]</var></p>
<p data-if="!EX_DIGITS2[4] && !ADDITION_TABLE[4]">pull down <var>EX_DIGITS3[5]</var><var>EX_DIGITS3[4]</var></p>
- <p data-if="!EX_DIGITS2[4] && DDITION_TABLE[4] && X_DIGITS3[5]">pull down <var>EX_DIGITS3[5]</var></p>
+ <p data-if="!EX_DIGITS2[4] && ADDITION_TABLE[4] && EX_DIGITS3[5]">pull down <var>EX_DIGITS3[5]</var></p>
<p>The sum is <var>RESULT*pow(10, A_SHIFT+B_SHIFT)</var></p>
<p>The first multiplicand has <var>A_SHIFT</var> digits after the decimal.</p>
<p>The second multiplicand has <var>B_SHIFT</var> digits after the decimal.</p>
View
2 exercises/multiplying_fractions.html
@@ -6,7 +6,7 @@
</head>
<body>
<div class="exercise">
- <div class="vars" data-ensure="getGCD(A, B) === 1 && etGCD(C, D) === 1">
+ <div class="vars" data-ensure="getGCD(A, B) === 1 && getGCD(C, D) === 1">
<var id="NEG1">randFromArray([1, -1])</var>
<var id="NEG1S">NEG1 === -1 ? "-" : ""</var>
<var id="A">randRange(1, 9)</var>
View
2 exercises/quadratic_formula.html
@@ -88,7 +88,7 @@
</div>
<div>
- <div data-if="DISC_FACTOR[0] > 1 && bs(DISC_FACTOR[1]) != 1">
+ <div data-if="DISC_FACTOR[0] > 1 && abs(DISC_FACTOR[1]) != 1">
<!-- The number under the radical can be factored as a perfect square and a number (other than 1) times a perfect square -->
<p><code>x = <var>expr(["frac", ["+-", -1 * B, ["sqrt", ["*", DISC_FACTOR[1], DISC_FACTOR[0] ] ]],
2 * A])</var></code></p>
View
2 exercises/slope_of_a_line.html
@@ -6,7 +6,7 @@
</head>
<body>
<div class="exercise">
- <div class="vars" data-ensure="Math.pow(Y1 - Y2, 2) + Math.pow(X1 - X2, 2) < 36 && 1 < X2">
+ <div class="vars" data-ensure="Math.pow(Y1 - Y2, 2) + Math.pow(X1 - X2, 2) < 36 && X1 < X2">
<var id="X1">randRange(-9, 9)</var>
<var id="Y1">randRange(-9, 9)</var>

0 comments on commit bd44359

Please sign in to comment.
Something went wrong with that request. Please try again.