Permalink
Browse files

Add video hint experiment for factoring_polynomials_1

Summary: Add video hints, solution only, and steps only to the existing exercise with detailed hints

Test Plan: Tested each locally

Reviewers: stephanie

Reviewed By: stephanie

Differential Revision: http://phabricator.khanacademy.org/D929
  • Loading branch information...
1 parent 38e3e34 commit 1988b35f3348e083978e31496f2feb7123f2ddfc @beneater beneater committed Nov 19, 2012
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html data-require="math math-format">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Factoring polynomials 1</title>
+ <script src="../khan-exercise.js"></script>
+</head>
+<body>
+ <div class="exercise">
+ <div class="problems">
+ <div>
+ <div class="vars">
+ <div data-ensure="abs(A) !== abs(B)">
+ <var id="A">randRangeNonZero( -10, 10 )</var>
+ <var id="B">randRangeNonZero( -10, 10 )</var>
+ </div>
+ <var id="SQUARE">1</var>
+ <var id="CONSTANT">SQUARE*A*B</var>
+ <var id="SIMPLECONSTANT">A*B</var>
+ <var id="LINEAR">SQUARE*(-A-B)</var>
+ <var id="SIMPLELINEAR">-A-B</var>
+ </div>
+
+ <p class="problem">Factor the following expression:</p>
+ <p class="question"><code><var>plus(SQUARE + "x^2")</var> + <var>plus( LINEAR + "x" )</var> + <var>CONSTANT</var></code></p>
+
+ <div class="solution" data-type="set">
+ <div class="set-sol" data-type="regex">^\s*\(\s*[xX]\s*<var>A &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( A )</var>\s*\)\s*\(\s*[xX]\s*<var>B &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( B )</var>\s*\)\s*$</div>
+ <div class="set-sol" data-type="regex">^\s*\(\s*[xX]\s*<var>B &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( B )</var>\s*\)\s*\(\s*[xX]\s*<var>A &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( A )</var>\s*\)\s*$</div>
+ <div class="input-format"><span class="entry"></span></div>
+ <div class="example">a factored expression, like <b>(x+1)(x+2)</b></div>
+ </div>
+
+ <div class="hints">
+
+ <p>
+ <code>(x <var>A &lt; 0 ? "+" : ""</var> <var>-A</var>)
+ (x <var>B &lt; 0 ? "+" : ""</var> <var>-B</var>)</code>
+ </p>
+
+ </div>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html data-require="math math-format">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Factoring polynomials 1</title>
+ <script src="../khan-exercise.js"></script>
+</head>
+<body>
+ <div class="exercise">
+ <div class="problems">
+ <div>
+ <div class="vars">
+ <div data-ensure="abs(A) !== abs(B)">
+ <var id="A">randRangeNonZero( -10, 10 )</var>
+ <var id="B">randRangeNonZero( -10, 10 )</var>
+ </div>
+ <var id="SQUARE">1</var>
+ <var id="CONSTANT">SQUARE*A*B</var>
+ <var id="SIMPLECONSTANT">A*B</var>
+ <var id="LINEAR">SQUARE*(-A-B)</var>
+ <var id="SIMPLELINEAR">-A-B</var>
+ </div>
+
+ <p class="problem">Factor the following expression:</p>
+ <p class="question"><code><var>plus(SQUARE + "x^2")</var> + <var>plus( LINEAR + "x" )</var> + <var>CONSTANT</var></code></p>
+
+ <div class="solution" data-type="set">
+ <div class="set-sol" data-type="regex">^\s*\(\s*[xX]\s*<var>A &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( A )</var>\s*\)\s*\(\s*[xX]\s*<var>B &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( B )</var>\s*\)\s*$</div>
+ <div class="set-sol" data-type="regex">^\s*\(\s*[xX]\s*<var>B &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( B )</var>\s*\)\s*\(\s*[xX]\s*<var>A &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( A )</var>\s*\)\s*$</div>
+ <div class="input-format"><span class="entry"></span></div>
+ <div class="example">a factored expression, like <b>(x+1)(x+2)</b></div>
+ </div>
+
+ <div class="hints">
+
+ <div>
+ <p><code>
+ x^2 <var>SIMPLELINEAR &gt;= 0 ? "+" : ""</var> <var>plus( "\\color{" + GREEN + "}{" + SIMPLELINEAR + "}x" )</var>
+ <var>SIMPLECONSTANT &gt;= 0 ? "+" : ""</var> <var>plus( "\\color{" + BLUE + "}{" + SIMPLECONSTANT + "}" )</var>
+ </code></p>
+ <p><code>
+ \color{<var>PINK</var>}{<var>-A</var>} + \color{<var>PINK</var>}{<var>-B</var>} =
+ \color{<var>GREEN</var>}{<var>SIMPLELINEAR</var>}
+ </code></p>
+ <p><code>
+ \color{<var>PINK</var>}{<var>-A</var>} \times \color{<var>PINK</var>}{<var>-B</var>} =
+ \color{<var>BLUE</var>}{<var>SIMPLECONSTANT</var>}
+ </code></p>
+ </div>
+
+ <p><b>
+ <code>(x <var>A &lt; 0 ? "+" : ""</var> \color{<var>PINK</var>}{<var>-A</var>})
+ (x <var>B &lt; 0 ? "+" : ""</var> \color{<var>PINK</var>}{<var>-B</var>})</code>
+ </b></p>
+
+ </div>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html data-require="math math-format">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Factoring polynomials 1</title>
+ <script src="../khan-exercise.js"></script>
+</head>
+<body>
+ <div class="exercise">
+ <div class="problems">
+ <div>
+ <div class="vars">
+ <div data-ensure="abs(A) !== abs(B)">
+ <var id="A">randRangeNonZero( -10, 10 )</var>
+ <var id="B">randRangeNonZero( -10, 10 )</var>
+ </div>
+ <var id="SQUARE">1</var>
+ <var id="CONSTANT">SQUARE*A*B</var>
+ <var id="SIMPLECONSTANT">A*B</var>
+ <var id="LINEAR">SQUARE*(-A-B)</var>
+ <var id="SIMPLELINEAR">-A-B</var>
+ </div>
+
+ <p class="problem">Factor the following expression:</p>
+ <p class="question"><code><var>plus(SQUARE + "x^2")</var> + <var>plus( LINEAR + "x" )</var> + <var>CONSTANT</var></code></p>
+
+ <div class="solution" data-type="set">
+ <div class="set-sol" data-type="regex">^\s*\(\s*[xX]\s*<var>A &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( A )</var>\s*\)\s*\(\s*[xX]\s*<var>B &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( B )</var>\s*\)\s*$</div>
+ <div class="set-sol" data-type="regex">^\s*\(\s*[xX]\s*<var>B &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( B )</var>\s*\)\s*\(\s*[xX]\s*<var>A &lt; 0 ? "\\+" : "[-\u2212]"</var>\s*<var>abs( A )</var>\s*\)\s*$</div>
+ <div class="input-format"><span class="entry"></span></div>
+ <div class="example">a factored expression, like <b>(x+1)(x+2)</b></div>
+ </div>
+
+ <div class="hints">
+ <div>
+ <div data-video-hint data-youtube-id="1kfq0aR3ASs"></div>
+ </div>
+
+ <p>
+ The factored expression is <code>(x <var>A &lt; 0 ? "+" : ""</var> <var>-A</var>)
+ (x <var>B &lt; 0 ? "+" : ""</var> <var>-B</var>)</code>
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+</body>
+</html>

0 comments on commit 1988b35

Please sign in to comment.