# Khan/khan-exercises

1 parent 0415132 commit 767d7c442d39c628b630c4d92e9f3f5244af5d15 jeffdyer committed Jan 17, 2012
Showing with 256 additions and 126 deletions.
1. +76 −0 exercises/polynomial_intuition_1.html
2. +1 −2 utils/ast.js
3. +179 −124 utils/math-model.js
 @@ -0,0 +1,76 @@ + + + + + Polynomial Intuition 1 + + + +
+
+
+
+ MathModel.init() + randRangeNonZero(-3, 3) + 1 + 2*b + b*b + MATH.polynomial([A, B, C], "x") + + MATH.parse("x^2+"+B+"x+"+C) +
+
+

+ Write the equation of the following graph: +

+
+ MATH.graph(P) +
+
+
+
+ Enter the factored expression here:
+ +
+
window._guess
+
+ var isCorrect = MATH.isEqual(MATH.parse(guess), S); + MATH.graph(MATH.parse(guess), isCorrect?ORANGE:BLUE); + return isCorrect; +
+
+
+
x^2-6x+9
+
+ +
+
+
+ +
 @@ -3,7 +3,6 @@ @see http://artcompiler.org/articles/asts-for-khan-exercises.pdf - var nid = ast.fromExpr(["=", ["+", 1, 1], 2])); var node = ast.node(nid); // returns a node object corresponding to nid var expr = ast.node("lhs"); var answer = ast.node("rhs"); @@ -20,7 +19,7 @@ jQuery.extend ( KhanUtil, { - ASSERT: false, + ASSERT: true, assert: function (val, str) { if ( !this.ASSERT ) {