# Khan/khan-exercises

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

(Oops.)
1 parent a7bd4bd commit bd44359201c205cefc1d46387af887c22e9a509d spicyj committed Jun 28, 2011
 @@ -38,14 +38,14 @@

A_ARRAY[2] + B_ARRAY[2] = A_ARRAY[2] + B_ARRAY[2]

-

-

A_ARRAY[3] + B_ARRAY[3] = A_ARRAY[3] + B_ARRAY[3]

-

-

+

+

A_ARRAY[3] + B_ARRAY[3] = A_ARRAY[3] + B_ARRAY[3]

+

+

-

-

A_ARRAY[4] + B_ARRAY[4] = A_ARRAY[4] + B_ARRAY[4]

+

+

A_ARRAY[4] + B_ARRAY[4] = A_ARRAY[4] + B_ARRAY[4]

Pull down the rest

The final result is A+B

2 exercises/age_word_problems.html
 @@ -162,7 +162,7 @@
-
+
randRange(3, 5) randRange(1, 10) * (C - 1) randRange(C * B + 1, 15) * (C - 1)
2 exercises/arithmetic_word_problems.html
 @@ -101,7 +101,7 @@
-
+
randRange( 10, 99 ) getNontrivialFactor( TOTAL_ITEMS ) TOTAL_ITEMS / ITEMS
2 exercises/comparing_fractions_2.html
 @@ -12,7 +12,7 @@ -->
-
+
randRange( 2, 3 ) randRange( 1, 14 ) randRange( 1, 14 )
2 exercises/dividing_fractions.html
 @@ -6,7 +6,7 @@
-
+
randFromArray([1, -1]) NEG1 === -1 ? "-" : "" randRange(1, 9)
2 exercises/divisibility_intro.html
 @@ -18,7 +18,7 @@ num_factors = round( factorization.length / 2 ), answer = 1; - for (var i = 0; i < num_factors && actorization.length; i++) { + for (var i = 0; i < 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) );
2 exercises/equation_of_a_line.html
 @@ -6,7 +6,7 @@
-
+
randRange(-9, 9) randRange(-9, 9)
2 exercises/exponents_1.html
 @@ -61,7 +61,7 @@ BASE > 0 ? "" : ( isEven( EXP ) ? "even" : "odd" ) EXP === 0 - !HINT1 && XP === 1 + !HINT1 && EXP === 1 !HINT1 && !HINT2 && ( BASE === 0 || BASE === 1 || BASE === -1 ) !HINT1 && !HINT2 && !HINT3
2 exercises/exponents_2.html
 @@ -67,7 +67,7 @@
-

= fracParens( BASEF_N, BASEF_D )^{EXP}

+

= fracParens( BASEF_N, BASEF_D )^{EXP}

= v

= frac( SOL_N, SOL_D )

4 exercises/exponents_4.html
 @@ -46,7 +46,7 @@ round( pow( EXP_NEG ? BASE_D : BASE_N, 1 / EXP_D ) ) round( pow( EXP_NEG ? BASE_N : BASE_D, 1 / EXP_D ) ) - ROOT_NEG && sOdd( EXP_N ) + ROOT_NEG && isOdd( EXP_N ) round( pow( ROOT_N, EXP_N ) ) round( pow( ROOT_D, EXP_N ) ) @@ -75,7 +75,7 @@

So fracParens( BASEF_N, BASEF_D )^{fracSmall( EXP_N, EXP_D )}=\left(fracParens( BASEF_N, BASEF_D )^{fracSmall( 1, EXP_D )}\right)^{EXP_N}=fracParens( ROOT_N, ROOT_D )^{EXP_N}

-

= fraction( ROOT_N, ROOT_D, true, true, false, true )^{EXP_N}

+

= fraction( ROOT_N, ROOT_D, true, true, false, true )^{EXP_N}

= v

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 {
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 {
4 exercises/functions_3.html
 @@ -6,7 +6,7 @@
-
+
["f", "g", "h"] ["x", "n", "t"] @@ -42,7 +42,7 @@
-
+
new CompositePolynomial( randRange(0, 2), randRange(1, 3), null, randFromArray(FUNC_VARIABLES), randFromArray(FUNC_NAMES), randFromArray([INNER, OUTER]) ) shuffle([INNER, OUTER, OUTER2])
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; }
4 exercises/limits_1.html
 @@ -99,8 +99,8 @@ \lim_{x\toa} f(x) & \\ \text{where} \quad f(x) & = \left \{ \begin{array}{1 1} - d_line & \quad \text{if} \quad x \neq a\\ - d_cons & \quad \text{if} \quad x = a\\ + d_line &\quad \text{if} \quad x \neq a\\ + d_cons &\quad \text{if} \quad x = a\\ \end{array} \right. \end{align*}

2 exercises/line_graph_intuition.html
 @@ -50,7 +50,7 @@
-
+
randRange( -8, 8 ) randRange( -8, 8 ) randRange( -8, 8 )
2 exercises/line_relationships.html
 @@ -8,7 +8,7 @@
-
+
randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 ) randRangeNonZero( -5, 5 )
2 exercises/midpoint_formula.html
 @@ -20,7 +20,7 @@
-
+
randRange( -9, 7 ) randRange( -9, 7 ) randRange( -9, 8 )
12 exercises/multiplication_4.html
 @@ -67,15 +67,15 @@

-

+

DIGITS[3] + EX_DIGITS2[3] = DIGITS[3] + EX_DIGITS2[3]

-

-

-

pull down EX_DIGITS2[4]

+

+

+

pull down EX_DIGITS2[4]

-

+

pull down EX_DIGITS2[4]EX_DIGITS2[3]

-

pull down EX_DIGITS2[4]

+

pull down EX_DIGITS2[4]

The final result is A*B

6 exercises/multiplying_and_dividing_negative_numbers.html
 @@ -6,7 +6,7 @@
-
+
rand( 18 ) - 9 rand( 18 ) - 9 A * B @@ -17,7 +17,7 @@

A \times B = ?

C
-

A negative times a negative is a positive.

+

A negative times a negative is a positive.

A negative times a positive is a negative.

A positive times a negative is a negative.

A \times B = C

@@ -28,7 +28,7 @@

C \div B = ?

A
-

A negative divided by a negative is a positive.

+

A negative divided by a negative is a positive.

A negative divided by a positive is a negative.

A positive divided by a negative is a negative.

C \div B = A

20 exercises/multiplying_decimals.html
 @@ -87,24 +87,24 @@

-

DIGITS[3] + EX_DIGITS2[3] + EX_DIGITS3[3] + ADDITION_TABLE[3] = DIGITS[3] + EX_DIGITS2[3] + EX_DIGITS3[3] + ADDITION_TABLE[3]

+

DIGITS[3] + EX_DIGITS2[3] + EX_DIGITS3[3] + ADDITION_TABLE[3] = DIGITS[3] + EX_DIGITS2[3] + EX_DIGITS3[3] + ADDITION_TABLE[3]

DIGITS[3] + EX_DIGITS2[3] + EX_DIGITS3[3] = DIGITS[3] + EX_DIGITS2[3] + EX_DIGITS3[3]

-

+

-

+

EX_DIGITS2[3] + EX_DIGITS3[3] = EX_DIGITS2[3] + EX_DIGITS3[3]

-

+

-

+

EX_DIGITS2[4] + EX_DIGITS3[4] = EX_DIGITS2[4] + EX_DIGITS3[4]

-

-

-

pull down EX_DIGITS3[5]

+

+

+

pull down EX_DIGITS3[5]

-

+

pull down EX_DIGITS3[5]EX_DIGITS3[4]

-

pull down EX_DIGITS3[5]

+

pull down EX_DIGITS3[5]

The sum is RESULT*pow(10, A_SHIFT+B_SHIFT)

The first multiplicand has A_SHIFT digits after the decimal.

The second multiplicand has B_SHIFT digits after the decimal.

2 exercises/multiplying_fractions.html
 @@ -6,7 +6,7 @@
-
+
randFromArray([1, -1]) NEG1 === -1 ? "-" : "" randRange(1, 9)
 @@ -88,7 +88,7 @@
-
+

x = expr(["frac", ["+-", -1 * B, ["sqrt", ["*", DISC_FACTOR[1], DISC_FACTOR[0] ] ]], 2 * A])

2 exercises/slope_of_a_line.html
 @@ -6,7 +6,7 @@
-
+
randRange(-9, 9) randRange(-9, 9)