Skip to content
Browse files

Merge branch 'master' of github.com:Khan/khan-exercises into i18n-ext…

…ract
  • Loading branch information...
2 parents 27f52aa + 40918ed commit c9e5f295b1db0602c09812bdbe28e986d6434a3b @jeresig jeresig committed Jan 23, 2013
Showing with 367 additions and 2,371 deletions.
  1. +4 −0 .arcconfig
  2. +0 −105 exercises/addition_rule_of_probability.html
  3. +0 −30 exercises/algebra_challenge.html
  4. +0 −15 exercises/arithmetic_challenge.html
  5. +0 −31 exercises/changing_decimals_to_percents.html
  6. +0 −45 exercises/changing_fractions_to_decimals_1.html
  7. +0 −59 exercises/changing_fractions_to_percents.html
  8. +0 −30 exercises/changing_percents_to_decimals.html
  9. +0 −44 exercises/changing_percents_to_fractions.html
  10. +0 −33 exercises/common_factors_of_a_polynomial_1.html
  11. +0 −34 exercises/common_factors_of_a_polynomial_2.html
  12. +0 −185 exercises/comparing_objects.html
  13. +0 −246 exercises/distributive_property_with_variables.html
  14. +0 −204 exercises/even_and_odd_integers.html
  15. +0 −53 exercises/factoring_difference_of_squares_4.html
  16. +0 −107 exercises/factoring_polynomials_3.html
  17. +0 −14 exercises/geometry_1.html
  18. +8 −1 exercises/graphing_systems_of_equations.html
  19. +0 −329 exercises/kinematic_equations.html
  20. +1 −1 exercises/least_common_multiple_and_greatest_common_divisor_word_problems.html
  21. +5 −2 exercises/matrix_transpose.html
  22. +0 −179 exercises/ordering_objects.html
  23. +0 −20 exercises/pre-algebra_challenge.html
  24. +0 −13 exercises/similar_triangles_review.html
  25. +0 −34 exercises/simplifying_rational_expressions_1.html
  26. +0 −34 exercises/simplifying_rational_expressions_2.html
  27. +0 −74 exercises/simplifying_square_roots_of_negatives.html
  28. +0 −58 exercises/trig_identities_1.html
  29. +0 −19 exercises/trigonometry_challenge.html
  30. +4 −4 exercises/visualizing_derivatives.html
  31. +290 −319 khan-exercise.js
  32. +20 −20 utils/chemistry.js
  33. +35 −29 utils/visualizing-derivatives.js
View
4 .arcconfig
@@ -0,0 +1,4 @@
+{
+ "project_id": "khan-exercises",
+ "conduit_uri": "http://phabricator.khanacademy.org/"
+}
View
105 exercises/addition_rule_of_probability.html
@@ -1,105 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math math-format probability word-problems stat">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Addition rule of probability</title>
- <script src="../khan-exercise.js"></script>
- <script type="text/javascript">
- function enFunc(innerString, usePercentages) {
- if (usePercentages)
- return "<code>P(</code>" + innerString + "<code>)</code>";
- else
- return "<code>\\lvert</code>" + innerString + "<code>\\rvert</code>";
- }
- </script>
-</head>
-<body>
- <div class="exercise">
- <div class="problems">
- <div>
- <div class="vars">
- <var id="VARINDX_X, VARINDX_Y, VARINDX_X_OR_Y, VARINDX_X_AND_Y">[0, 1, 2, 3]</var>
- <var id="CHOOSE_ATTRIBUTES">
- function( attrChoices1, attrChoices2 ) {
- att1 = randFromArray( attrChoices1 );
- att2 = randFromArray( attrChoices2 );
- return [ att1, att2, att1 + " or " + att2, att1 + " and " + att2 ];
- }
- </var>
- <var id="INTRO, VARDESC, QSTNPRETEXT, QSTNPOSTTEXT, USEPERCENTAGES">
- <!-- Put each question in the following structure: [INTRO, [X DESC, Y DESC, X_OR_Y DESC, X_AND_Y DESC], QSTNPRETEXT, QSTNPOSTTEXT, USEPERCENTAGES] -->
- randFromArray([
- ["A local store ran a sale on two items, a watch and a shirt. There were ", ["customers who bought a watch", "customers who bought a shirt", "customers who bought a watch or a shirt", "customers who bought a watch and a shirt"], "What was the number of ", "?", false],
- ["A study group at a nearby high school has ", ["sophomores", "girls", "students who are a sophomore or a girl", "sophomore girls"], "How many ", " are there in the study group?", false],
- ["In a sample of patients, ", CHOOSE_ATTRIBUTES( ["male", "female"], ["colorblind", "overweight", "underweight", "over sixty", "healthy", "under eighteen", "healthy"] ), "What percentage of the patients are ", "?", true],
- ["Of the houses in a town, ", CHOOSE_ATTRIBUTES( ["white", "blue", "light green", "solar powered", "near a park"], ["air conditioned", "wooden", "stucco"] ), "What percentage of the houses are ", "?", true],
- ["A census was recently taken in a certain community, and the results include the following facts about the residents: ", CHOOSE_ATTRIBUTES( ["Hispanic", "Asian", "White", "Black"], ["male", "female", "under 18", "over 65"] ), "What percentage of the residents are ", "?", true],
- ["A car dealer advertises statistics desribing her inventory. Of the cars on her lot, the advertisement states ", CHOOSE_ATTRIBUTES( ["white", "blue", "light green", "red", "grey", "black"], ["trucks", "minivans", "SUVs", "sports cars", "sedans"] ), "What percentage of the cars are ", "?", true]
- ])
- </var>
- <!-- Randomize the order the variables (X, Y, X_OR_Y, X_AND_Y) are written in the question -->
- <var id="ORDER">shuffle( [0, 1, 2, 3] )</var>
- <!-- Assign values to each variable, subject to constraints so all counts are > 1 and no counts are negative -->
- <var id="VARVALS">
- ( function( usePercentages ) {
- var rangemin = usePercentages ? 1 : 2;
- var rangemax = usePercentages ? 100 : 10;
- var vals = [0, 0, 0, 0];
- vals[VARINDX_X] = randRange( rangemin, rangemax );
- vals[VARINDX_Y] = randRange( rangemin, rangemax );
- vals[VARINDX_X_AND_Y] = randRange( max( rangemin, vals[VARINDX_X]+vals[VARINDX_Y]-100 ), min( vals[VARINDX_X], vals[VARINDX_Y] ) );
- vals[VARINDX_X_OR_Y] = vals[VARINDX_X] + vals[VARINDX_Y] - vals[VARINDX_X_AND_Y];
- return vals;
- } )( USEPERCENTAGES )
- </var>
- <var id="QUESTIONTEXT">
- ( function() {
- var optionalPercentage = USEPERCENTAGES ? "% are " : " ";
- var qstn = INTRO;
- for (var i=0; i &lt; ORDER.length-1; i++) {
- qstn += (i===ORDER.length-2) ? " and " : "";
- qstn += VARVALS[ORDER[i]] + optionalPercentage + VARDESC[ORDER[i]];
- qstn += (i &lt; ORDER.length-2) ? ", " : ". ";
- }
- qstn += QSTNPRETEXT + VARDESC[ORDER[ORDER.length-1]] + QSTNPOSTTEXT;
- return qstn;
- } )()
- </var>
- <!-- this just passes the call to plain JS to avoid problems with unescaped HTML in the function body, while still giving access to vars -->
- <var id="ENFUNC"> function (innerString) { return enFunc(innerString, USEPERCENTAGES); } </var>
-
- </div>
- <div class="question"><p><var>QUESTIONTEXT</var></p></div>
- <div class="solution"><var>VARVALS[ORDER[ORDER.length-1]]</var></div>
- <div class="hints">
- <p>Remember the addition rule of probability: <code>P(A\cup B) = P(A) + P(B) - P(A\cap B)</code></p>
- <p data-if="USEPERCENTAGES === false">Because the denominator of the fraction for each probability is the same, for convenience we can also just use cardinality (the number of items in each category) instead of probability: <code>|A\cup B| = |A|+ |B| - |A\cap B|</code></p>
-
- <!-- substitute english descriptions for variables -->
- <p>Substituting variables, <var>ENFUNC(VARDESC[2])</var> = <var>ENFUNC(VARDESC[0])</var> + <var>ENFUNC(VARDESC[1])</var> - <var>ENFUNC(VARDESC[3])</var></p>
-
- <!-- rearrange the unknown to the left hand side IF it wasn't already -->
- <p data-if="ORDER[ORDER.length-1] === 0">Rearranging, <var>ENFUNC(VARDESC[0])</var> = <var>ENFUNC(VARDESC[3])</var> + <var>ENFUNC(VARDESC[2])</var> - <var>ENFUNC(VARDESC[1])</var></p>
- <p data-if="ORDER[ORDER.length-1] === 1">Rearranging, <var>ENFUNC(VARDESC[1])</var> = <var>ENFUNC(VARDESC[3])</var> + <var>ENFUNC(VARDESC[2])</var> - <var>ENFUNC(VARDESC[0])</var></p>
- <p data-if="ORDER[ORDER.length-1] === 3">Rearranging, <var>ENFUNC(VARDESC[3])</var> = <var>ENFUNC(VARDESC[0])</var> + <var>ENFUNC(VARDESC[1])</var> - <var>ENFUNC(VARDESC[2])</var></p>
-
- <!-- substitue vals for vars on RHS -->
- <p data-if="ORDER[ORDER.length-1] === 0"><var>ENFUNC(VARDESC[0])</var> = <code><var>VARVALS[3]</var> + <var>VARVALS[2]</var> - <var>VARVALS[1]</var></code>
- <p data-if="ORDER[ORDER.length-1] === 1"><var>ENFUNC(VARDESC[1])</var> = <code><var>VARVALS[3]</var> + <var>VARVALS[2]</var> - <var>VARVALS[0]</var></code>
- <p data-if="ORDER[ORDER.length-1] === 2"><var>ENFUNC(VARDESC[2])</var> = <code><var>VARVALS[0]</var> + <var>VARVALS[1]</var> - <var>VARVALS[3]</var></code>
- <p data-if="ORDER[ORDER.length-1] === 3"><var>ENFUNC(VARDESC[3])</var> = <code><var>VARVALS[0]</var> + <var>VARVALS[1]</var> - <var>VARVALS[2]</var></code>
-
- <!-- give the final answer -->
- <p data-if="ORDER[ORDER.length-1] === 0"><var>ENFUNC(VARDESC[0])</var> = <code><var>VARVALS[3] + VARVALS[2] - VARVALS[1]</var></code>
- <p data-if="ORDER[ORDER.length-1] === 1"><var>ENFUNC(VARDESC[1])</var> = <code><var>VARVALS[3] + VARVALS[2] - VARVALS[0]</var></code>
- <p data-if="ORDER[ORDER.length-1] === 2"><var>ENFUNC(VARDESC[2])</var> = <code><var>VARVALS[0] + VARVALS[1] - VARVALS[3]</var></code>
- <p data-if="ORDER[ORDER.length-1] === 3"><var>ENFUNC(VARDESC[3])</var> = <code><var>VARVALS[0] + VARVALS[1] - VARVALS[2]</var></code>
- </div>
- </div>
-
- </div>
- </div>
-</body>
-</html>
-
-
View
30 exercises/algebra_challenge.html
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Algebra challenge</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise" data-name="equation_of_a_line"></div>
- <div class="exercise" data-name="linear_equations_4"></div>
- <div class="exercise" data-name="linear_inequalities"></div>
- <div class="exercise" data-name="average_word_problems"></div>
- <div class="exercise" data-name="solving_quadratics_by_factoring"></div>
- <div class="exercise" data-name="quadratic_equation"></div>
- <div class="exercise" data-name="systems_of_equations"></div>
- <div class="exercise" data-name="even_and_odd_functions"></div>
- <div class="exercise" data-name="inverses_of_functions"></div>
- <div class="exercise" data-name="shifting_and_reflecting_functions"></div>
- <div class="exercise" data-name="percentage_word_problems_2"></div>
- <div class="exercise" data-name="logarithms_1"></div>
- <div class="exercise" data-name="domain_of_a_function"></div>
- <div class="exercise" data-name="age_word_problems"></div>
- <div class="exercise" data-name="midpoint_formula"></div>
- <div class="exercise" data-name="solving_for_a_variable"></div>
- <div class="exercise" data-name="line_relationships"></div>
- <div class="exercise" data-name="absolute_value_equations"></div>
- <div class="exercise" data-name="expressions_with_unknown_variables_2"></div>
- <div class="exercise" data-name="radical_equations"></div>
-</body>
-</html>
View
15 exercises/arithmetic_challenge.html
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Arithmetic challenge</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise" data-name="multiplying_decimals"></div>
- <div class="exercise" data-name="dividing_decimals"></div>
- <div class="exercise" data-name="multiplying_fractions"></div>
- <div class="exercise" data-name="multiplying_and_dividing_negative_numbers"></div>
- <div class="exercise" data-name="dividing_fractions"></div>
-</body>
-</html>
View
31 exercises/changing_decimals_to_percents.html
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math">
- <head>
- <title>Changing decimals to percents</title>
- <script src="../khan-exercise.js"></script>
- </head>
- <body>
- <div class="exercise">
- <div class="vars">
- <var id="DECIMAL">randRange( 50, 999 ) / 1000</var> <!-- between 0.05 and .999, pcts with 1 decimal place-->
- <var id="SOLN">DECIMAL * 100</var>
- </div>
-
- <div class="problems">
- <div id="original" data-weight="1">
- <p class="question">Express <code><var>DECIMAL</var></code> as a percent.</p>
- <div class="solution" data-type="multiple">
- <p><span class="sol" data-forms="decimal"><var>SOLN</var></span> %</p>
- </div>
-
- <div class="hints">
- <p>To convert a decimal to a fraction, we need to multiply by 100 and add the <code>\%</code> symbol.</p>
- <p>To multiply by 100, we can just move the decimal point two places to the right.</p>
- <p><code><var>DECIMAL</var> \rightarrow <var>DECIMAL * 10 </var> \rightarrow <var>SOLN</var></code></p>
- <p>So <code><var>DECIMAL</var></code> = <code><var>SOLN</var>\%</code>.</p>
- </div>
- </div>
- </div>
- </div>
- </body>
-</html>
View
45 exercises/changing_fractions_to_decimals_1.html
@@ -1,45 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math math-format graphie graphie-helpers">
-<head>
- <title>Changing fractions to decimals 1</title>
- <script src="../khan-exercise.js"></script>
-
- <script type="text/javascript">
- function decimalLength( n ) {
- return ( ( n + "" ).split( "." )[1] || "" ).length;
- }
-
- </script>
-</head>
-
-<body>
-<div class="exercise">
- <div class="vars">
- <div data-ensure="decimalLength( DEC ) <= 4">
- <var id="_D">randFromArray([ 4, 5, 8, 10, 16, 20, 25, 40, 50, 100 ])</var>
- <var id="_N">randRange( 1, _D - 1 )</var>
- <var id="DEC">_N / _D</var>
- </div>
-
- <var id="GCD">getGCD( _N, _D )</var>
- <var id="N">round( _N / GCD )</var>
- <var id="D">round( _D / GCD )</var>
- </div>
-
- <div class="problems">
- <div>
- <p class="question">Express <code><var>fraction( _N, _D )</var></code> as a decimal.</p>
- <div class="solution" data-type="decimal"><var>DEC</var></div>
- </div>
- </div>
-
- <div class="hints">
- <p data-if="GCD > 1"><code><var>fraction( _N, _D )</var></code> reduces to <code><var>fraction( N, D )</var></code>.</p>
- <p data-if="D === 10 || D === 100">Denominators of 10 or 100 are easy cases: The decimal form is just the numerator with the decimal place moved left by the number of 0s in the denominator.
- <p data-if="D === 10 || D === 100">For this question, this means <var>D === 10 ? "1 place" : "2 places"</var>.</p>
- <p data-else>To turn <code><var>fractionSmall( N, D )</var></code> into a decimal, perform long division, dividing <code><var>D</var></code> into <code><var>N</var></code> (if you need help with this, try practicing some Division exercises or watching some related videos).</p>
- <p><code><var>N</var> \div <var>D</var> = <var>DEC</var></code></p>
- </div>
-</div>
-</body>
-</html>
View
59 exercises/changing_fractions_to_percents.html
@@ -1,59 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math math-format graphie graphie-helpers">
-<head>
- <title>Changing fractions to percents</title>
- <script src="../khan-exercise.js"></script>
-
- <script type="text/javascript">
- function decimalLength( n ) {
- return ( ( n + "" ).split( "." )[1] || "" ).length;
- }
-
- </script>
-</head>
-
-<body>
- <div class="exercise">
- <div class="problems">
- <div>
- <div class="vars">
-
- <div data-ensure="decimalLength( DEC ) <= 4">
- <var id="_D">randFromArray([ 4, 5, 8, 10, 16, 20, 25, 40, 50, 100 ])</var>
- <var id="_N">randRange( 1, _D - 1 )</var>
- <var id="DEC">_N / _D</var>
- </div>
-
- <var id="GCD">getGCD( _N, _D )</var>
- <var id="N">round( _N / GCD )</var>
- <var id="D">round( _D / GCD )</var>
-
- </div>
-
- <p class="question">Express <code><var>fraction( _N, _D )</var></code> as a percent.</p>
-
- <div class="solution" data-type="multiple">
- <span class="sol" data-type="decimal"><var>100 * DEC</var></span> %
- </div>
-
- <div class="hints">
- <div data-if="_D === 100" data-unwrap>
- <p>When the denominator is 100, you can simply take the numerator and apply the % sign:</p>
- <p><code><var>fraction( _N, _D )</var></code> = <var>100 * DEC</var>%</p>
- </div>
- <div data-else data-unwrap>
- <p data-if="GCD > 1"><code><var>fraction( _N, _D )</var></code> reduces to <code><var>fraction( N, D )</var></code>.</p>
- <p>To turn a fraction into a percent, turn the fraction into a decimal and then multiply the decimal by 100.</p>
- <p data-if="D === 10">Denominators of 10 are an easy case: The decimal form is just the numerator with the decimal place moved left by the number of 0s in the denominator - in this case 1 place.</p>
- <p data-else>To turn <code><var>fraction( N, D )</var></code> into a decimal, perform long division, dividing <code><var>D</var></code> into <code><var>N</var></code> (if you need help with this, try practicing some Division exercises or watching some related videos).</p>
- <p><code><var>N</var> \div <var>D</var> = <var>DEC</var></code></p>
- <p>To convert this decimal into a percent, we need to multiply it by 100.</p>
- <p><code><var>DEC</var> = (100 \cdot <var>DEC</var>) \% = <var>roundTo( 2, 100 * DEC )</var>\%</code></p>
- </div>
- </div>
- </div>
- </div>
- </div>
-</body>
-</html>
-
View
30 exercises/changing_percents_to_decimals.html
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math">
-<head>
- <title>Changing percents to decimals</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
-<div class="exercise">
- <div class="vars">
- <var id="PCT">randRange( 10, 1999 ) / 10</var> <!-- between 1% and 199.9% with 1 decimal place-->
- <var id="SOLN">roundTo( 5 , PCT / 100 )</var>
- </div>
-
- <div class="problems">
- <div id="original" data-weight="1">
- <p class="question">Express <code><var>PCT</var>\%</code> as a decimal.</p>
- <div class="solution" data-type="decimal"><var>SOLN</var></div>
-
- <div class="hints">
- <p><code><var>PCT</var>\%</code> literally means <code><var>PCT</var></code> per 100</p>
- <p><code><var>PCT</var>\%</code> = <code>\dfrac{<var>PCT</var>}{<var>100</var>}</code></p>
- <p>To easily divide by 100, you can just move the decimal point two places to the left.</p>
- <p><code><var>PCT</var> \rightarrow <var>roundTo( 5, PCT / 10 )</var> \rightarrow <var>SOLN</var></code></p>
- <p>So <code><var>PCT</var>\%</code> = <code><var>SOLN</var></code><p>
- </div>
- </div>
- </div>
-</div>
-</body>
-</html>
View
44 exercises/changing_percents_to_fractions.html
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math math-format">
-<head>
- <title>Changing percents to fractions</title>
- <script src="../khan-exercise.js"></script>
-</head>
-
-<body>
- <div class="exercise">
-
- <div class="problems">
- <div id="lt-100">
- <div class="vars">
- <var id="A">randRangeExclude( 1 , 299 , [ 100 ] )</var>
- </div>
- <p class="question">Express <code><var>A</var>\%</code> as a fraction. Reduce to lowest terms.</p>
- <p class="solution" data-type="rational"><var>A / 100</var></p>
- <div class="hints">
- <p><code><var>A</var>\%</code> literally means <code><var>A</var></code> per 100</p>
- <p>Putting this in fraction form: <code><var>fraction( A , 100 )</var></code></p>
- <p data-if="getGCD( A , 100 ) > 1">Both numerator and denominator are divisible by <code><var>getGCD( A , 100 )</var></code>.</p>
- <p data-if="getGCD( A , 100 ) > 1">Reducing to lowest terms, <code><var>fractionReduce( A , 100 )</var></code>.</p>
- <p data-if="A > 100">Optionally, the improper fraction <code><var>fractionReduce( A , 100 )</var></code> can be converted to the mixed number <code><var>( A - A % 100 ) / 100 + fractionReduce( round ( A % 100 ), 100 )</var></code>.</p>
- </div>
- </div>
-
- <div id="decimal" data-type="lt-100">
- <div class="vars">
- <var id="A">randRange( 101, 1999 ) / 10</var>
- </div>
- <div class="hints">
- <p><code><var>A</var>\%</code> literally means <code><var>A</var></code> per 100</p>
- <p>Putting this in fraction form: <code><var>fraction( A , 100 )</var></code></p>
- <p data-if="( A * 10 ) % 10 !== 0">Multiplying top and bottom by 10 to get rid of the decimal: <code><var>fraction( A * 10 , 1000 )</var></code></p>
- <p data-if="getGCD( A * 10 , 1000 ) > 1">Both numerator and denominator are divisible by <code><var>getGCD( A * 10 , 1000 )</var></code>.</p>
- <p data-if="getGCD( A * 10 , 1000 ) > 1">Reducing to lowest terms, <code><var>fractionReduce( A * 10 , 1000 )</var></code>.</p>
- <p data-if="A > 100">Optionally, the improper fraction <code><var>fractionReduce( A * 10 , 1000 )</var></code> can be converted to the mixed number <code><var>( A * 10 - A * 10 % 1000 ) / 1000 + fractionReduce( round ( A * 10 % 1000 ), 1000 )</var></code>.</p>
- </div>
- </div>
-
- </div>
- </div>
-</body>
-</html>
View
33 exercises/common_factors_of_a_polynomial_1.html
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math graphie math-model factoring-expressions simplify subhints">
-<head>
- <meta charset="UTF-8" />
- <title>Common factors of a polynomial 1</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise">
- <div class="vars">
- <var id="X">{op:"var", args:["x"]}</var>
- <var id="Y">{op:"var", args:["y"]}</var>
- <var id="Z">{op:"var", args:["z"]}</var>
- <var id="PROBLEM">genFactoringExercise([2, 3, 5, 7, X, Y, Z], 2, 3)</var>
- <var id="SOLUTION">solveFactoringExercise(PROBLEM.question)</var>
- </div>
- <div class="problems">
- <div>
- <p class="problem">Factor the following expression by finding the common factors of its terms:</p>
- <p class="question"><code><var>format(PROBLEM.question)</var></code></p>
- <p class="solution"><code><var>format(SOLUTION.solution)</var></code></p>
-
- <ul class="choices" data-none="true" data-show="5">
- <li data-each="PROBLEM.choices as key, value"><code><var>format(value)</var></code></li>
- </ul>
- </div>
- </div>
- <div class="hints">
- <div data-each="SOLUTION.hints as key, value"><var>value</var></div>
- </div>
- </div>
-</body>
-</html>
View
34 exercises/common_factors_of_a_polynomial_2.html
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math graphie math-model factoring-expressions simplify">
-<head>
- <meta charset="UTF-8" />
- <title>Common factors of a polynomial 2</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise">
- <div class="vars">
- <var id="W">{op:"var", args:["w"]}</var>
- <var id="X">{op:"var", args:["x"]}</var>
- <var id="Y">{op:"var", args:["y"]}</var>
- <var id="Z">{op:"var", args:["z"]}</var>
- <var id="PROBLEM">genFactoringExercise([2, 3, 5, 7, W, X, Y, Z], 3, 4)</var>
- <var id="SOLUTION">solveFactoringExercise(PROBLEM.question)</var>
- </div>
- <div class="problems">
- <div>
- <p class="problem">Factor the following expression by finding the common factors of its terms:</p>
- <p class="question"><code><var>format(PROBLEM.question)</var></code></p>
- <p class="solution"><code><var>format(SOLUTION.solution)</var></code></p>
-
- <ul class="choices" data-none="true" data-show="5">
- <li data-each="PROBLEM.choices as key, value"><code><var>format(value)</var></code></li>
- </ul>
- </div>
- </div>
- <div class="hints">
- <div data-each="SOLUTION.hints as key, value"><var>value</var></div>
- </div>
- </div>
-</body>
-</html>
View
185 exercises/comparing_objects.html
@@ -1,185 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math graphie word-problems">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Comparing objects</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise">
- <div class="vars">
- <var id="SHAPE">randFromArray(["square", "circle", "triangle"])</var>
- <var id="SIZES">shuffle([4, 5.2, 6.4, 7.6, 8.8, 10], 4)</var>
- <var id="COLORS">shuffle(["#aec6f4", "#fdcf76", "#8ed4b8", "#fd79d4"])</var>
- <var id="DRAW">{}</var>
- </div>
-
- <p class="question">
- Which <var>SHAPE</var> is the <var>QUESTION</var>?
- </p>
-
- <div class="problem">
- <div class="graphie">
- init({ range: [[0, 100], [-11, 11]], scale: [5, 5] });
- var x = 0;
- DRAW.square = function(x, y, size, color) {
- KhanUtil.currentGraph.path([[x - size, y + size], [x + size, y + size], [x + size, y - size],
- [x - size, y - size], true],
- { strokeWidth: 2, stroke: "black", fill: color });
- };
- DRAW.circle = function(x, y, size, color) {
- KhanUtil.currentGraph.circle([x, y], size, { strokeWidth: 2, stroke: "black", fill: color });
- };
- DRAW.triangle = function(x, y, size, color) {
- KhanUtil.currentGraph.path([[x, y + size], [x + (2 * size) / sqrt(3), y - size / sqrt(3)],
- [x - (2 * size) / sqrt(3), y - size / sqrt(3)], true ],
- { strokeWidth: 2, stroke: "black", fill: color });
- };
-
- _(4).times(function(i) {
- x += SIZES[i] + 5;
- DRAW[SHAPE](x, 0, SIZES[i], COLORS[i]);
- label([x, 0], "ABCD"[i]);
- x += SIZES[i];
- });
- </div>
- </div>
-
- <p class="solution"><var>capitalize(SHAPE)</var> <code><var>SOLUTION</var></code></p>
- <ul class="choices" data-category="true">
- <li><var>capitalize(SHAPE)</var> <code>A</code></li>
- <li><var>capitalize(SHAPE)</var> <code>B</code></li>
- <li><var>capitalize(SHAPE)</var> <code>C</code></li>
- <li><var>capitalize(SHAPE)</var> <code>D</code></li>
- </ul>
-
-
- <div class="problems">
- <div id="biggest">
- <div class="vars" data-apply="appendVars">
- <var id="QUESTION">"biggest"</var>
- <var id="SOLUTION">"ABCD"[_.indexOf(SIZES, _.max(SIZES))]</var>
- <var id="COMPARISONS">(function() {
- var l = [];
-
- for (var i = 1; i &lt; 4; i++) {
- var first = l.length ? l[l.length - 1].larger : 0;
- var second = i;
- var larger = _.max([first, second], function(i) { return SIZES[i]; });
- var smaller = _.min([first, second], function(i) { return SIZES[i]; });
- l.push({
- first: first,
- second: second,
- larger: larger,
- smaller: smaller
- });
- }
- return l;
- })()</var>
- </div>
-
- <div class="hints">
- <p>Bigger things take up more space.</p>
- <p>Which <var>SHAPE</var> takes up the most space?</p>
- <div data-each="COMPARISONS as COMP" data-unwrap>
- <p>
- Which takes up more space? <var>capitalize(SHAPE)</var> <code><var>"ABCD"[COMP.first]</var></code>
- or <var>SHAPE</var> <code><var>"ABCD"[COMP.second]</var></code>?
- </p>
- <div>
- <div class="graphie" style="float: left">
- init({ range: [[-11, 16], [-11, 11]], scale: [5, 5] });
- DRAW[SHAPE](0, 0, SIZES[COMP.larger], COLORS[COMP.larger]);
- DRAW[SHAPE](0, 0, SIZES[COMP.smaller], COLORS[COMP.smaller]);
- label([0, 0], "ABCD"[COMP.smaller]);
- label([SIZES[COMP.larger] + 2, 0], "ABCD"[COMP.larger]);
- </div>
- <p style="height: 100px;">
- We can move
- <var>SHAPE</var> <code><var>"ABCD"[COMP.smaller]</var></code> inside
- <var>SHAPE</var> <code><var>"ABCD"[COMP.larger]</var></code>, so
- <var>SHAPE</var> <code><var>"ABCD"[COMP.larger]</var></code> is bigger than
- <var>SHAPE</var> <code><var>"ABCD"[COMP.smaller]</var></code>.
- </p>
- </div>
- </div>
- <div>
- <div class="graphie" style="float: left">
- init({ range: [[-11, 16], [-11, 11]], scale: [5, 5] });
- _.each(sortNumbers(SIZES).reverse(), function(size) {
- DRAW[SHAPE](0, 0, size, COLORS[_.indexOf(SIZES, size)]);
- });
- label([_.max(SIZES) + 2, 0], SOLUTION);
- </div>
- <p style="height: 100px;">
- <var>capitalize(SHAPE)</var> <code><var>SOLUTION</var></code> is the biggest.
- </p>
- </div>
- </div>
- </div>
-
- <div id="smallest">
- <div class="vars" data-apply="appendVars">
- <var id="QUESTION">"smallest"</var>
- <var id="SOLUTION">"ABCD"[_.indexOf(SIZES, _.min(SIZES))]</var>
- <var id="COMPARISONS">(function() {
- var l = [];
-
- for (var i = 1; i &lt; 4; i++) {
- var first = l.length ? l[l.length - 1].smaller : 0;
- var second = i;
- var larger = _.max([first, second], function(i) { return SIZES[i]; });
- var smaller = _.min([first, second], function(i) { return SIZES[i]; });
- l.push({
- first: first,
- second: second,
- larger: larger,
- smaller: smaller
- });
- }
- return l;
- })()</var>
- </div>
-
- <div class="hints">
- <p>Smaller things take up less space.</p>
- <p>Which <var>SHAPE</var> takes up the least space?</p>
- <div data-each="COMPARISONS as COMP" data-unwrap>
- <p>
- Which takes up less space? <var>capitalize(SHAPE)</var> <code><var>"ABCD"[COMP.first]</var></code>
- or <var>SHAPE</var> <code><var>"ABCD"[COMP.second]</var></code>?
- </p>
- <div>
- <div class="graphie" style="float: left">
- init({ range: [[-11, 16], [-11, 11]], scale: [5, 5] });
- DRAW[SHAPE](0, 0, SIZES[COMP.larger], COLORS[COMP.larger]);
- DRAW[SHAPE](0, 0, SIZES[COMP.smaller], COLORS[COMP.smaller]);
- label([0, 0], "ABCD"[COMP.smaller]);
- </div>
- <p style="height: 100px;">
- We can move
- <var>SHAPE</var> <code><var>"ABCD"[COMP.smaller]</var></code> inside
- <var>SHAPE</var> <code><var>"ABCD"[COMP.larger]</var></code>, so
- <var>SHAPE</var> <code><var>"ABCD"[COMP.smaller]</var></code> is smaller than
- <var>SHAPE</var> <code><var>"ABCD"[COMP.larger]</var></code>.
- </p>
- </div>
- </div>
- <div>
- <div class="graphie" style="float: left">
- init({ range: [[-11, 16], [-11, 11]], scale: [5, 5] });
- _.each(sortNumbers(SIZES).reverse(), function(size) {
- DRAW[SHAPE](0, 0, size, COLORS[_.indexOf(SIZES, size)]);
- });
- label([0, 0], SOLUTION);
- </div>
- <p style="height: 100px;">
- <var>capitalize(SHAPE)</var> <code><var>SOLUTION</var></code> is the smallest.
- </p>
- </div>
- </div>
- </div>
- </div>
- </div>
-</body>
-</html>
View
246 exercises/distributive_property_with_variables.html
@@ -1,246 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math math-format">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Distributive property with variables</title>
- <script src="../khan-exercise.js"></script>
- <script type="text/javascript">
- function color( str, blue ) {
- var pre = "";
-
- if ( typeof str === "number" && str < 0 ) {
- pre = "-";
- str = Math.abs( str );
- } else if ( typeof str === "string" && str.indexOf( "-" ) === 0 ) {
- pre = "-";
- str = str.slice( 1 );
- }
-
- return pre + "\\color{" + ( blue ? "blue" : "green" ) + "}{" + str + "}";
- }
- </script>
-</head>
-<body>
- <div class="exercise">
- <div class="vars">
-
- <var id="LETTERS">"abcdefghijklmnpqrstuvwxyz"</var>
- <var id="LETTER">randRange( 0, LETTERS.length - 2 )</var>
- <var id="X">LETTERS[ LETTER + 0 ]</var>
- <var id="Y">LETTERS[ LETTER + 1 ]</var>
- <!-- Make it possible to use parenthetical expressions inside plus() functions -->
- <var id="PLUSPARENS">function( a, b ) {
- return "(" + plus( a, b ) + ")";
- }</var>
-
- </div>
-
- <div class="problems">
- <!-- A(x + y) + B -->
- <div id="xPlusB">
- <div class="vars">
- <var id="A">randRangeNonZero( -10, 10 )</var>
- <var id="B">randRangeNonZero( -10, 10 )</var>
- <var id="YSIGN">randRangeNonZero( -1, 1 )</var>
- </div>
-
-
- <p class="problem"><code><var>plus( A+PLUSPARENS( X, YSIGN+Y ), B )</var></code></p>
- <p class="question">Use the distributive property to simplify the expression.</p>
- <p class="solution"><code><var>plus( A+X, A*YSIGN+Y, B )</var></code></p>
- <ul class="choices" data-show="4" data-none="true">
- <li><code><var>plus( A+X, YSIGN+Y, B )</var></code></li>
- <li><code><var>plus( A+X, YSIGN+Y, A*B )</var></code></li>
- <li><code><var>plus( A, X, YSIGN+Y, B )</var></code></li>
- <li><code><var>plus( A+X, A+Y, fraction( B, A, true, true ) )</var></code></li>
- <li><code><var>plus( fraction( 1, A, true, true )+X, fraction( YSIGN, A, true, true )+Y, B )</var></code></li>
- <li><code><var>plus( A+X, A*YSIGN+Y, A+B )</var></code></li>
- <li><code><var>plus( X, YSIGN+Y, A+B )</var></code></li>
- <li><code><var>plus( X, YSIGN+Y, A*B )</var></code></li>
- </ul>
-
- <div class="hints">
- <div>
- <p>Distribute across the parenthesis.</p>
- <p><code><var>plus( A+PLUSPARENS( color( X, false ), color( YSIGN+Y, false ) ), B )</var></code></p>
- </div>
- <div data-if="A === -1">
- <p>A negative sign before an expression is the same as -1 times that expression.</p>
- <p><code>\color{ blue }{ -1 }*<var>plus( PLUSPARENS( color( X, false ), color( YSIGN+Y, false ) ), B )</var></code></p>
- </div>
- <p><code><var>color( A, true )</var>*<var>color( X, false )</var> + <var>color( A*YSIGN, true )</var>*<var>color( Y, false )</var> + <var>B</var></code></p>
-
- <div>
- <p><code><var>plus( A+X, A*YSIGN+Y, B )</var></code></p>
- <p>You're done!</p>
- </div>
-
- <div>
- <p>Remember that the <em>distributive property</em> shows that multiplying an expression involving addition (or subtraction) by <code>x</code> is the same thing as multiplying each term of the expression by <code>x</code> before performing the addition.
- <p><code>x(y + z) = xy + xz</code></p>
- </div>
-
- </div>
- </div>
-
- <!-- A + B(x + C) + D, B is only 1 or -1 -->
- <div id="ABXCD">
- <div class="vars">
- <var id="A">randRangeNonZero( -10, 10 )</var>
- <var id="B">randRangeNonZero( -1, 1 )</var>
- <var id="C">randRangeNonZero( -10, 10 )</var>
- <var id="D">randRangeNonZero( -10, 10 )</var>
- </div>
-
- <p class="problem"><code><var>A</var> + <var>plus( B+PLUSPARENS( X, C ) )</var> + <var>D</var></code></p>
- <p class="question">Using the distributive property, simplify the expression as much as possible.</p>
-
- <p class="solution"><code><var>plus( B+X, A+(B*C)+D )</var></code></p>
- <ul class="choices" data-show="4" data-none="true">
- <li data-if="C !== (A+D)"><code><var>X</var> - <var>A+(-1*C)+D</var></code></li>
- <li data-if="(A+C+D) !== 0"><code><var>plus( B+X )</var> + <var>A+C+D</var></code></li>
- <li data-if="C !== (A+D)"><code><var>X</var> + <var>A+(-1*C)+D</var></code></li>
- <li data-if="(A+C+D) !== 0"><code><var>X</var> - <var>A+C+D</var></code></li>
- <li data-if="(A+C+D) !== 0"><code><var>X</var> + <var>A+C+D</var></code></li>
- <li data-if="(C+D) !== 0"><code><var>plus( A, B+X, C+D )</var></code></li>
- <li data-if="C !== D"><code><var>plus( A, B+X, (-1*C)+D )</var></code></li>
- </ul>
-
- <div class="hints">
- <div>
- <p>The first and last numbers here can be combined to simplify the expression.</p>
- <p><code><var>color( A, true )</var> + <var>plus( B+PLUSPARENS( X, C ) )</var> + <var>color( D, true )</var></code></p>
- </div>
- <p><code><var>plus( B+PLUSPARENS( X, C ) )</var> + <var>color( A+D, true )</var></code></p>
- <div data-if="B < 0" data-unwrap>
- <div>
- <p>A negative sign before an expression is the same as -1 times that expression.</p>
- <p><code>\color{ blue }{ -1 }*<var>color( PLUSPARENS( X, C ), false )</var> + <var>A+D</var></code></p>
- </div>
- <p><code>\color{ blue }{ -1*<var>X</var> + -1*<var>C</var> } + <var>A+D</var></code></p>
- <p><code><var>plus( B+X, B*C )</var> + <var>A+D</var></code></p>
- </div>
- <p data-if="B > 0"><code><var>plus( X, C, A+D )</var></code></p>
- <div>
- <p><code><var>plus( B+X, (B*C)+A+D )</var></code></p>
- <p>You're done!</p>
- </div>
- <div>
- <p>Remember that the <em>distributive property</em> shows that multiplying an expression involving addition (or subtraction) by <code>x</code> is the same thing as multiplying each term of the expression by <code>x</code> before performing the addition.
- <p><code>x(y + z) = xy + xz</code></p>
- </div>
- </div>
-
- </div>
-
- <!-- A(x + B) + C(D + x) -->
- <div id="AXBCDX">
- <div class="vars">
- <var id="A">randRangeNonZero( -10, 10 )</var>
- <var id="B">randRangeNonZero( -10, 10 )</var>
- <var id="C">randRangeNonZero( -10, 10 )</var>
- <var id="D">randRangeNonZero( -10, 10 )</var>
- </div>
-
- <p class="problem"><code><var>plus( A+PLUSPARENS( X, B ), C+PLUSPARENS( D, X ) )</var></code></p>
- <p class="question">Using the distributive property, simplify the expression as much as possible.</p>
-
- <p class="solution"><code><var>plus( (A+C)+X, (A*B)+(C*D) )</var></code></p>
- <ul class="choices" data-show="5" data-none="true">
- <li><code><var>plus( (A+1)+X, B+(C*D) )</var></code></li>
- <li><code><var>plus( 2+X, A+B+C+D )</var></code></li>
- <li><code><var>plus( (B+D)+X, A+C )</var></code></li>
- <li><code><var>plus( A+PLUSPARENS( X, B ), C*D, C+X )</var></code></li>
- <li><code><var>plus( (A+C)+X, B+(C*D) )</var></code></li>
- <li><code><var>plus( (C+1)+X, A*B+C*D )</var></code></li>
- <li><code><var>plus( A+X, A*B, C+PLUSPARENS( D, X ) )</var></code></li>
- </ul>
-
- <div class="hints">
- <div>
- <p>Distribute across the first parenthesis.</p>
- <p><code><var>plus( color( A, true )+color( PLUSPARENS( X, B ), false ), C+PLUSPARENS( D, X ) )</var></code></p>
- </div>
- <div data-if="A === -1">
- <p>A negative sign before an expression is the same as -1 times that expression.</p>
- <p><code>\color{ blue }{ -1 }*<var>plus( color( PLUSPARENS( X, B ), false ), C+PLUSPARENS( D, X ) )</var></code></p>
- </div>
- <p><code><var>color( plus( A+X, A*B ), false )</var> + <var>plus( C+PLUSPARENS( D, X ) )</var></code></p>
- <div>
- <p>Distribute across the second parenthesis.</p>
- <p><code><var>plus( A+X, A*B )</var> + <var>plus( color( C, true )+color( PLUSPARENS( D, X ), false ) )</var></code></p>
- </div>
- <div data-if="C === -1">
- <p data-if="A !== -1">A negative sign before an expression is the same as -1 times that expression.</p>
- <p><code><var>plus( A+X, A*B )</var> + \color{ blue }{ -1 }*<var>plus( color( PLUSPARENS( D, X ), false ) )</var></code></p>
- </div>
- <p><code><var>plus( A+X, A*B )</var> + <var>color( plus( C*D, C+X ) )</var></code></p>
- <div>
- <p>Combine like terms.</p>
- <p><code><var>color( A+X, true )</var> + <var>color( A*B, false )</var> + <var>color( C*D, false )</var> + <var>color( C+X, true )</var></code></p>
- </div>
- <p data-if="((A*B) + (C*D)) === 0"><code><var>color( plus( (A+C)+X ), true )</var> + <var>color( (A*B)+(C*D), false )</var></code></p>
- <div>
- <p><code><var>plus( (A+C)+X, (A*B)+(C*D) )</var></code></p>
- <p>You're done! Make sure you simplify as much as possible.</p>
- </div>
- <div>
- <p>Remember that the <em>distributive property</em> shows that multiplying an expression involving addition (or subtraction) by <code>x</code> is the same thing as multiplying each term of the expression by <code>x</code> before performing the addition.
- <p><code>x(y + z) = xy + xz</code></p>
- </div>
- </div>
-
- </div>
-
- <!-- A(x + B) + Cx -->
- <div id="AXBCX">
- <div class="vars">
- <var id="A">randRangeNonZero( -10, 10 )</var>
- <var id="B">randRangeNonZero( -10, 10 )</var>
- <var id="C">randRangeNonZero( -10, 10 )</var>
- </div>
-
- <p class="problem"><code><var>plus( A+PLUSPARENS( X, B ), C+X )</var></code></p>
- <p class="question">Using the distributive property, simplify the expression as much as possible.</p>
-
- <p class="solution"><code><var>plus( (A+C)+X, A*B )</var></code></p>
- <ul class="choices" data-show="5" data-none="true">
- <li><code><var>plus( (A+1)+X, B+C )</var></code></li>
- <li><code><var>plus( 2+X, A+B+C )</var></code></li>
- <li><code><var>plus( (A+C)+X, (-1*A*B) )</var></code></li>
- <li><code><var>plus( ((-1*A)+C)+X, A*B )</var></code></li>
- <li><code><var>plus( ((-1*A)+C)+X, (-1*A*B) )</var></code></li>
- <li><code><var>plus( (A+C)+X, B )</var></code></li>
- <li><code><var>plus( (1 + C)+X, A*B )</var></code></li>
- </ul>
-
- <div class="hints">
- <div>
- <p>Distribute across the parenthesis.</p>
- <p><code>\color{ blue }{ <var>plus( A+PLUSPARENS( X, B ) )</var> } + <var>plus( C+X )</var></code></p>
- </div>
- <div data-if="A === -1">
- <p>A negative sign before an expression is the same as -1 times that expression.</p>
- <p><code>\color{ blue }{ -1 }*<var>plus( color( PLUSPARENS( X, B ), false ), plus( C+X ) )</var></code></p>
- </div>
- <p><code><var>color( plus( A+X, A*B ), false )</var> + <var>plus( C+X )</var></code></p>
- <div>
- <p>Combine like terms.</p>
- <p><code><var>color( A+X, true )</var> + <var>color( A*B, false )</var> + <var>color( C+X, true )</var></code></p>
- </div>
- <div>
- <p><code><var>plus( (A+C)+X, A*B )</var></code></p>
- <p>You're done!</p>
- </div>
- <div>
- <p>Remember that the <em>distributive property</em> shows that multiplying an expression involving addition (or subtraction) by <code>x</code> is the same thing as multiplying each term of the expression by <code>x</code> before performing the addition.
- <p><code>x(y + z) = xy + xz</code></p>
- </div>
- </div>
- </div>
-
- </div>
-
- </div>
-</body>
-</html>
View
204 exercises/even_and_odd_integers.html
@@ -1,204 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math expressions graphie">
- <head>
- <title>Even and odd integers</title>
- <script src="../khan-exercise.js"></script>
-
- <script>
- // traverses binary expression tree
- function isExprEven( epr, isEvens ) {
- if ( epr in isEvens ) {
- return isEvens[ epr ];
-
- } else if ( epr instanceof Array ) {
- switch ( epr[0] ) {
- case "+":
- case "-":
- return ( isExprEven( epr[1], isEvens ) === isExprEven( epr[2], isEvens ) );
-
- case "times":
- return ( isExprEven( epr[1], isEvens ) || isExprEven( epr[2], isEvens ) );
- }
-
- } else {
- return ( epr % 2 === 0 );
-
- }
- }
-
- function evenOrOdd( epr, isEvens ) {
- return ( isExprEven( epr, isEvens ) ? "even" : "odd" );
- }
-
- function labelMaker( epr, evenOrOdd, colors, problemExpr, problemExprLevels ) {
- var b = 0.2;
-
- var searchStr = KhanUtil.expr( problemExpr ).replace( / \\times /g, "*" );
- var exprStr = KhanUtil.expr( epr ).replace( / \\times /g, "*" );
-
- var indices = [];
- var idx = searchStr.indexOf( exprStr );
- while ( idx !== -1 ) {
- indices.push( idx );
- idx = searchStr.indexOf( exprStr, idx + 1 );
- }
-
- var labels = $.map( indices, function( idx ) {
- var x = idx / 2.5 + 0.075,
- y = (problemExprLevels - 0.6) - exprStr.length / 2.5,
- width = exprStr.length / 1.9;
-
- return function( graph ) {
- graph.path([ [ x, y + b ], [ x, y ],
- [ ( x + width ), y ], [ ( x + width ), ( y + b ) ] ],
- { stroke: colors[ evenOrOdd ] });
- graph.label( [ ( x + width / 2 ), ( y - 0.1 ) ],
- "\\scriptsize{\\color{" + colors[ evenOrOdd ] + "}{\\text{" + evenOrOdd + "}}}", "center" );
- };
- } );
-
- return function( graph ) {
- $.each( labels, function( i, el ) {
- el( graph );
- } );
- };
- }
-
- function getHints( epr, isEvens, colors, problemExpr, problemExprLevels ) {
- var hints = [];
- var eoro = evenOrOdd( epr, isEvens );
-
- var hint = {};
- hint.graph = labelMaker( epr, eoro, colors, problemExpr, problemExprLevels );
-
- if ( epr instanceof Array ) {
- // flatten child hints
- hints.push( getHints( epr[1], isEvens, colors, problemExpr, problemExprLevels ) );
- hints.push( getHints( epr[2], isEvens, colors, problemExpr, problemExprLevels ) );
-
- eoro = colorEorO( eoro, colors );
- switch ( epr[0] ) {
- case "+":
- hint.text = "An " + coloredEvenOrOdd( epr[1], isEvens, colors ) + " plus an " + coloredEvenOrOdd( epr[2], isEvens, colors ) + " is " + eoro + ".";
- break;
-
- case "-":
- hint.text = "An " + coloredEvenOrOdd( epr[1], isEvens, colors ) + " minus an " + coloredEvenOrOdd( epr[2], isEvens, colors ) + " is " + eoro + ".";
- break;
-
- case "times":
- hint.text = "An " + coloredEvenOrOdd( epr[1], isEvens, colors ) + " times an " + coloredEvenOrOdd( epr[2], isEvens, colors ) + " is " + eoro + ".";
- break;
- }
- } else {
- hint.text = "<code>" + epr + "</code> is " + colorEorO( eoro, colors ) + ".";
- }
- hints.push( hint );
- // flatten hints array
- return $.map( hints, function( el ) { return el; } );
- }
-
- function coloredEvenOrOdd( epr, isEvens, colors ) {
- return colorEorO( evenOrOdd( epr, isEvens ), colors );
- }
-
- function colorEorO( eoro, colors ) {
- return '<span style="color: ' + colors[ eoro ] + '">' + eoro + '</span>';
- }
- </script>
- </head>
- <body>
- <div class="exercise">
- <div class="problems">
- <div id="m-plus-n">
- <div class="vars">
- <var id="EXPR">["+", "m", "n"]</var>
-
- <var id="EORO_COLORS">{ "even": "blue", "odd": "orange" }</var>
-
- <var id="IS_EVENS">{ "m": rand(2) === 0, "n": rand(2) === 0 }</var>
-
- <var id="EXPR_LEVELS">2</var>
-
- <var id="HINTS">getHints( EXPR, IS_EVENS, EORO_COLORS, EXPR, EXPR_LEVELS )</var>
- </div>
- <div class="problem">
- <ul>
- <li><code>m</code> is <var>evenOrOdd( "m", IS_EVENS )</var>.</li>
- <li><code>n</code> is <var>evenOrOdd( "n", IS_EVENS )</var>.</li>
- </ul>
- </div>
- <p class="question">Is <code><var>expr( EXPR )</var></code> even or odd?</p>
-
- <p class="solution"><var>( isExprEven( EXPR, IS_EVENS ) ? "Even" : "Odd" )</var></p>
- <ul class="choices" data-category="true">
- <li>Even</li>
- <li>Odd</li>
- </ul>
-
- <div class="hints">
- <div class="graphie" id="expression">
- init({
- range: [[0, 10], [-2, EXPR_LEVELS]],
- scale: [40, 40]
- });
-
- label( [0, EXPR_LEVELS], "\\large{" + expr( EXPR ) + "}", "below right" );
- </div>
- <div data-each="HINTS as I, HINT">
- <div class="graphie" data-update="expression">
- HINTS[I].graph( KhanUtil.currentGraph );
- </div>
- <p><var>HINT.text</var></p>
- </div>
- </div>
- </div>
-
- <div id="m-times-n" data-type="m-plus-n">
- <div class="vars">
- <var id="EXPR">["times", "m", "n"]</var>
- </div>
- </div>
-
- <div id="kn-plus-km" data-type="m-plus-n">
- <div class="vars">
- <var id="EXPR">["+", ["times", randRange(2, 5), "n"], ["times", randRange(2, 5), "m"]]</var>
-
- <var id="EXPR_LEVELS">3</var>
- </div>
- </div>
-
-
- <div id="m-plus-n-plus-p" data-type="m-plus-n">
- <div class="vars">
- <var id="EXPR">["+", "m", ["+", "n", "p"]]</var>
-
- <var id="IS_EVENS">{ "m": rand(2) === 0, "n": rand(2) === 0, "p": rand(2) === 0 }</var>
-
- <var id="EXPR_LEVELS">3</var>
- </div>
-
- <div class="problem">
- <ul>
- <li><code>m</code> is <var>evenOrOdd( "m", IS_EVENS )</var>.</li>
- <li><code>n</code> is <var>evenOrOdd( "n", IS_EVENS )</var>.</li>
- <li><code>p</code> is <var>evenOrOdd( "p", IS_EVENS )</var>.</li>
- </ul>
- </div>
- </div>
-
- <div id="n-times-m-plus-p" data-type="m-plus-n-plus-p">
- <div class="vars">
- <var id="EXPR">["times", "n", ["+", "m", "p"]]</var>
- </div>
- </div>
-
- <div id="np-minus-m-plus-p" data-type="m-plus-n-plus-p">
- <div class="vars">
- <var id="EXPR">["+", ["-", ["times", "n", "p"], "m"], "p"]</var>
- </div>
- </div>
- </div>
- </div>
- </body>
-</html>
View
53 exercises/factoring_difference_of_squares_4.html
@@ -1,53 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math math-model factoring-expressions simplify subhints">
-<head>
- <meta charset="UTF-8" />
- <title>Factoring difference of squares 4</title>
- <script src="../khan-exercise.js"></script>
- <style type="text/css">
- #answer_area input[type=text] {
- width: 20px;
- }
- </style>
-</head>
-<body>
- <div class="exercise">
- <div class="problems">
- <div>
- <div class="vars" data-ensure="getGCD( A, B ) === 1">
- <var id="F">randFromArray([2,3,5])</var>
- <var id="A">randRange( 2, 6 )</var>
- <var id="B">randRange( 1, 6 )</var>
- <var id="P">randRange( 2, 3 )</var>
- <var id="SQUARE">F * A * A</var>
- <var id="CONSTANT">F * -B * B</var>
- <var id="PROBLEM">parse(SQUARE + "x^" + (2*P) + CONSTANT)</var>
- <var id="SOLUTION">solveFactoringExercise(PROBLEM, {factorDiffOfSquares:true})</var>
- <var id="ERRORS">[
- format(solveFactoringExercise(PROBLEM, {factorDiffOfSquares:false}).solution),
- format(solveFactoringExercise(PROBLEM, {factorDiffOfSquares:"a^2-b^2=(a-b)^2"}).solution),
- format(solveFactoringExercise(PROBLEM, {factorDiffOfSquares:"a^2-b^2=(a-b)(b-a)"}).solution),
- format(solveFactoringExercise(PROBLEM, {factorDiffOfSquares:"a^2-b^2 = (a^2-b^2)(a^2+b^2)"}).solution),
- format(solveFactoringExercise(PROBLEM, {factorDiffOfSquares:true, factorWithDiffOfSquares:"a(b^2-c^2)=(ab-ac)(a+c))"}).solution),
- ]</var>
- </div>
- <div>
- <p class="question">
- Factor the following expression:
- </p>
- <p>
- <code><var>format(PROBLEM)</var></code>
- </p>
- </div>
- <p class="solution"><code><var>format(SOLUTION.solution)</var></code></p>
- <ul class="choices" data-none="true" data-show="5">
- <li data-each="ERRORS as key, value"><code><var>value</var></code></li>
- </ul>
- </div>
- </div>
- <div class="hints">
- <div data-each="SOLUTION.hints as key, value"><var>value</var></div>
- </div>
- </div>
-</body>
-</html>
View
107 exercises/factoring_polynomials_3.html
@@ -1,107 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math graphie math-model simplify">
-<head>
- <meta charset="UTF-8" />
- <title>Factoring polynomials 3</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise">
- <div class="problems">
- <div>
- <div class="vars">
- <var id="a">randRange(2, 9)</var>
- <var id="b_sign">randFromArray([-1, 1])</var>
- <var id="b_abs">randFromArrayExclude([3, 5, 7, 9], [a])</var>
- <var id="b">b_sign*b_abs</var>
- <var id="A">randFromArrayExclude(getFactors(a * b_abs), [1])</var>
- <var id="B">a + b</var>
- <var id="C">a * b / A</var>
- <var id="F1">getGCD(A, a)</var>
- <var id="F2">b_sign * getGCD(b_abs, C)</var>
- <var id="PROBLEM">simplify(polynomial([A, B, C], "x"), simplifyOptions.basic)</var>
- <!-- use parse so that the ast matches the parsed user input -->
- <var id="SOLUTION">parse("(" + F1 + "x+" + F2 + ")(" + A / F1 + "x+" + a / F1 + ")")</var>
- <var id="HINT1">parse(F1 + "x(" + A / F1 + "x+" + a / F1 + ")+" + F2 + "(" + b / F2 + "x+" + C / F2 + ")}")</var>
- <var id="GROUP1">[parse("#{ab} &=& #{A}*#{C} &=& " + (A*C), [GREEN, BLUE, ORANGE]),
- parse("#{a}+#{b} &=& #{B} &=& #{" + B, [GREEN, GREEN, PINK])]</var>
-
- </div>
- <div>
- <p class="question">
- Factor the following expression:
- </p>
- <p>
- <code><var>format(PROBLEM, "large")</var></code>
- </p>
- </div>
- <div class="solution" data-type="custom">
- <div class="instruction">
- <input name="response" type="text">
- </div>
- <div class="guess">jQuery("div.instruction input").val()</div>
- <div class="validator-function">
- return isEqual(parse(guess), SOLUTION);
- </div>
- <div class="show-guess">
- </div>
- <div class="show-guess-solutionarea">
- jQuery("div.instruction input").val(guess);
- </div>
- <div class="example">a factored expression, like <b>(x+1)(x+2)</b></div>
- </div>
- <div class="hints">
- <div>
- <p>The expression is of the form
- <code><var>parseFormat("#{A}x^2+#{B}x+#{C}}", [BLUE, PINK, ORANGE])</var></code>.
- You can factor this trinomial by grouping. In this case,
- <code>\blue{A}=\blue{<var>A</var>}</code>, <code>\pink{B}=\pink{<var>B</var>}</code>,
- <code>\orange{C}=\orange{<var>C</var>}</code>
- </p>
- </div>
- <div>
- <p>To do this, the first step is to find two values
- <code>\green{a}</code> and
- <code>\green{b}</code>, such that:</p>
- <p><code><var>parseFormat("#{ab} = #{A}*#{C}", [GREEN, BLUE, ORANGE])</var></code></p>
- <p><code><var>parseFormat("#{a}+#{b} = #{B}", [GREEN, GREEN, PINK])</var></code></p>
- <p>The next step is to rewrite the
- expression as <code><var>parseFormat("#{A}x^2 + #{a}x + #{b}x + #{C}", [BLUE, GREEN, GREEN, ORANGE])</var></code> or
- <code><var>parseFormat("(#{A}x^2 + #{a}x) + (#{b}x + #{C})", [BLUE, GREEN, GREEN, ORANGE])</var></code>, and factor each term, to
- find a common factor.</p>
- </div>
- <div>
- <p>To apply the first step, you need to find
- <code>\green{a}</code> and <code>\green{b}</code> such that:</p>
- <p><code><var>formatGroup(GROUP1, [0,1])</var></code></p>
- </div>
- <div>
- <p>The following values can be used:</p>
- <p><code><var>parseFormat("#{a}=#{" + a + "}", [GREEN, GREEN])</var></code><br>
- <code><var>parseFormat("#{b}=#{" + b + "}", [GREEN, GREEN])</var></code></p>
- </div>
- <div>
- <p>For the second step, rewrite the expression as:</p>
- <p><code><var>parseFormat("#{" + A + "}x^2+#{" + a + "}x+#{" + b + "}x+#{" + C + "}}", [BLUE, GREEN, GREEN, ORANGE])</var></code></p>
- <p>or</p><p><code><var>parseFormat("(#{" + A + "}x^2+#{" + a + "}x)+(#{" + b + "}x+#{" + C + "})", [BLUE, GREEN, GREEN, ORANGE])</var></code></p>
- <p>The next step is to factor both terms of the above expression:</p>
- </div>
- <div>
- <p>
- <code><var>format(HINT1, {del1factors:true, evalBasicNumOps:true})</var></code>
- </p>
- </div>
- <div class="final_answer">
- <p>
- Redistribute the common term to get the answer:
- </p>
- <p>
- <code><var>format(SOLUTION, simplifyOptions.basic, false, "large")</var></code>
- </p>
- </div>
- </div>
- </div>
- </div>
- </div>
-</body>
-</html>
View
14 exercises/geometry_1.html
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Geometry 1</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise" data-name="radius_diameter_and_circumference" data-weight="2"></div>
- <div class="exercise" data-name="area_of_a_circle" data-weight="2"></div>
- <div class="exercise" data-name="perimeter_of_squares_and_rectangles" data-weight="3"></div>
- <div class="exercise" data-name="area_of_squares_and_rectangles" data-weight="3"></div>
-</body>
-</html>
View
9 exercises/graphing_systems_of_equations.html
@@ -156,14 +156,21 @@
var yint1 = slope1 * ( 0 - guess[0][0] ) + guess[0][1];
var yint2 = slope2 * ( 0 - guess[2][0] ) + guess[2][1];
// allows blue function to be graphed with green line and vice versa, fwiw
- return ( abs( SLOPE_1 - slope1 ) &lt; 0.001
+ var graphCorrect = ( abs( SLOPE_1 - slope1 ) &lt; 0.001
&amp;&amp; abs( SLOPE_2 - slope2 ) &lt; 0.001
&amp;&amp; abs( YINT_1 - yint1 ) &lt; 0.001
&amp;&amp; abs( YINT_2 - yint2 ) &lt; 0.001 )
|| ( abs( SLOPE_1 - slope2 ) &lt; 0.001
&amp;&amp; abs( SLOPE_2 - slope1 ) &lt; 0.001
&amp;&amp; abs( YINT_2 - yint1 ) &lt; 0.001
&amp;&amp; abs( YINT_1 - yint2 ) &lt; 0.001 );
+ var pointCorrect = parseInt($("#solutionarea input").eq(0).val()) === X &amp;&amp;
+ parseInt($("#solutionarea input").eq(1).val()) === Y;
+
+ if (pointCorrect &amp;&amp; !graphCorrect) {
+ return "You found the right solution to the system of equations, but you haven't graphed them correctly.";
+ }
+ return graphCorrect;
</div>
<div class="show-guess">
graph.pointA.setCoord( guess[0] );
View
329 exercises/kinematic_equations.html
@@ -1,329 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Kinematic equations</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise">
- <div class="problems">
- <div id="accelerated" data-weight="3">
- <div class="vars" data-ensure="(OMITTED !== UNKNOWN) && !NO_SOLUTION">
- <var id="OMITTED">randFromArray(['a', 'd', 't', 'v_i', 'v_f'])</var>
- <var id="UNKNOWN">randFromArray(['a', 'd', 't', 'v_i', 'v_f'])</var>
- <var id="ACCEL">randRangeNonZero(-200, 200) / 10</var>
- <var id="V_INIT">randRange(-400, 400) / 10</var>
- <var id="TIME">randRange(100, 200) / 10</var>
- <var id="DISP">roundTo(2, V_INIT * TIME + (1/2) * ACCEL * TIME * TIME)</var>
- <var id="V_FINAL">roundTo(2, V_INIT + ACCEL * TIME)</var>
-
- <var id="NO_SOLUTION">
- /* negative under radical */
- (OMITTED === 'v_i' && UNKNOWN === 't' && (V_FINAL * V_FINAL - 2 * ACCEL * DISP &lt; 0.1)) ||
- (OMITTED === 'v_f' && UNKNOWN === 't' && (V_INIT * V_INIT + 2 * ACCEL * DISP &lt; 0.1)) ||
- (OMITTED === 't' && UNKNOWN === 'v_i' && (V_FINAL * V_FINAL - 2 * ACCEL * DISP &lt; 0.1)) ||
- (OMITTED === 't' && UNKNOWN === 'v_f' && (V_INIT * V_INIT + 2 * ACCEL * DISP &lt; 0.1)) ||
-
- /* division by 0 */
- (OMITTED === 'd' && UNKNOWN === 'a' && TIME === 0) ||
- (OMITTED === 'd' && UNKNOWN === 't' && ACCEL === 0) ||
- (OMITTED === 'v_i' && UNKNOWN === 'v_f' && TIME === 0) ||
- (OMITTED === 'v_i' && UNKNOWN === 'a' && TIME === 0) ||
- (OMITTED === 'v_i' && UNKNOWN === 't' && ACCEL === 0) ||
- (OMITTED === 'v_f' && UNKNOWN === 'v_i' && TIME === 0) ||
- (OMITTED === 'v_f' && UNKNOWN === 'a' && TIME === 0) ||
- (OMITTED === 'v_f' && UNKNOWN === 't' && ACCEL === 0) ||
- (OMITTED === 'a' && UNKNOWN === 'v_i' && TIME === 0) ||
- (OMITTED === 'a' && UNKNOWN === 'v_f' && TIME === 0) ||
- (OMITTED === 'a' && UNKNOWN === 't' && (-0.1 &lt; V_INIT + V_FINAL) && (V_INIT + V_FINAL &lt; 0.1)) ||
- (OMITTED === 't' && UNKNOWN === 'd' && ACCEL === 0) ||
- (OMITTED === 't' && UNKNOWN === 'a' && DISP === 0)
- </var>
- <var id="PLUS_OR_MINUS_SOLUTION">
- (OMITTED === 't' && UNKNOWN === 'v_i') ||
- (OMITTED === 't' && UNKNOWN === 'v_f')
- </var>
- <var id="QUADRATIC_TWO_SOLUTION">
- (OMITTED === 'v_i' && UNKNOWN === 't' && (V_FINAL * V_FINAL - 2 * ACCEL * DISP > 0.1)) ||
- (OMITTED === 'v_f' && UNKNOWN === 't' && (V_INIT * V_INIT + 2 * ACCEL * DISP > 0.1))
- </var>
- </div>
-
- <div class="problem">
- <p data-if="'d' !== OMITTED && 'd' !== UNKNOWN"><code>d = <var>DISP</var> \text{m}</code></p>
- <p data-if="'v_i' !== OMITTED && 'v_i' !== UNKNOWN"><code>v_i = <var>V_INIT</var> \frac{\text{m}}{\text{s}}</code></p>
- <p data-if="'v_f' !== OMITTED && 'v_f' !== UNKNOWN"><code>v_f = <var>V_FINAL</var> \frac{\text{m}}{\text{s}}</code></p>
- <p data-if="'a' !== OMITTED && 'a' !== UNKNOWN"><code>a = <var>ACCEL</var> \frac{\text{m}}{\text{s}^2}</code></p>
- <p data-if="'t' !== OMITTED && 't' !== UNKNOWN"><code>t = <var>TIME</var> \text{s}</code></p>
- <p><code><var>OMITTED</var> = {?}</code></p>
- <p><code><var>UNKNOWN</var> = {?}</code></p>
- </div>
-
- <div class="question">
- <p>Solve for <code><var>UNKNOWN</var></code>. Round to the nearest tenth.</p>
- <p>Make sure you select the proper units. You may do arithmetic with a calculator. If there is more than one correct solution, you may enter either one.</p>
- </div>
-
- <div class="solution" data-type="set" data-show-unused="true">
- <div class="set-sol" data-type="multiple" data-if="!QUADRATIC_TWO_SOLUTION">
- <span class="sol" data-type="decimal" data-inexact data-max-error="0.1">
- <var data-if="UNKNOWN === 'd'">roundTo(1, DISP)</var>
- <var data-if="UNKNOWN === 'v_i'">roundTo(1, V_INIT)</var>
- <var data-if="UNKNOWN === 'v_f'">roundTo(1, V_FINAL)</var>
- <var data-if="UNKNOWN === 'a'">roundTo(1, ACCEL)</var>
- <var data-if="UNKNOWN === 't'">roundTo(1, TIME)</var>
- </span>
- <span class="sol" data-type="list" data-choices="['', 'm', 'm/s', 'm/s&sup2;', 's']">
- <span data-if="UNKNOWN === 'd'">m</span>
- <span data-if="UNKNOWN === 'v_i'">m/s</span>
- <span data-if="UNKNOWN === 'v_f'">m/s</span>
- <span data-if="UNKNOWN === 'a'">m/s&sup2;</span>
- <span data-if="UNKNOWN === 't'">s</span>
- </span>
- </div>
-
- <div class="set-sol" data-type="multiple" data-if="PLUS_OR_MINUS_SOLUTION">
- <span class="sol" data-type="decimal" data-inexact data-max-error="0.1">
- <var data-if="UNKNOWN === 'v_i'">roundTo(1, -V_INIT)</var>
- <var data-if="UNKNOWN === 'v_f'">roundTo(1, -V_FINAL)</var>
- </span>
- <span class="sol" data-type="list" data-choices="['', 'm', 'm/s', 'm/s&sup2;', 's']">m/s</span>
- </div>
-
- <div class="set-sol" data-type="multiple" data-if="QUADRATIC_TWO_SOLUTION">
- <span class="sol" data-type="decimal" data-inexact data-max-error="0.1">
- <var data-if="UNKNOWN === 't' && OMITTED === 'v_i'">roundTo(1, ((-V_FINAL) + sqrt(V_FINAL * V_FINAL - 2 * ACCEL * DISP))/(-ACCEL))</var>
- <var data-if="UNKNOWN === 't' && OMITTED === 'v_f'">roundTo(1, ((-V_INIT) + sqrt(V_INIT * V_INIT + 2 * ACCEL * DISP))/ACCEL)</var>
- </span>
- <span class="sol" data-type="list" data-choices="['', 'm', 'm/s', 'm/s&sup2;', 's']">s</span>
- </div>
- <div class="set-sol" data-type="multiple" data-if="QUADRATIC_TWO_SOLUTION">
- <span class="sol" data-type="decimal" data-inexact data-max-error="0.1">
- <var data-if="UNKNOWN === 't' && OMITTED === 'v_i'">roundTo(1, ((-V_FINAL) - sqrt(V_FINAL * V_FINAL - 2 * ACCEL * DISP))/(-ACCEL))</var>
- <var data-if="UNKNOWN === 't' && OMITTED === 'v_f'">roundTo(1, ((-V_INIT) - sqrt(V_INIT * V_INIT + 2 * ACCEL * DISP))/ACCEL)</var>
- </span>
- <span class="sol" data-type="list" data-choices="['', 'm', 'm/s', 'm/s&sup2;', 's']">s</span>
- </div>
-
- <p class="input-format">
- <span class="entry" data-type="multiple">
- <code><var>UNKNOWN</var> = </code>
- <span class="sol" data-type="decimal" data-inexact data-max-error="0.1"></span>
- <span class="sol" data-type="list" data-choices="['', 'm', 'm/s', 'm/s&sup2;', 's']"></span>
- </span>
- </p>
-
- <p class="example">a decimal <em>and</em> a unit of measure</p>
- </div>
- </div>
-
-
- <div id="freefall" data-type="accelerated" data-weight="2">
- <div class="vars">
- <var id="ACCEL">-9.8</var>
- <var id="V_INIT">rand(2) ? 0 : randRange(-100, 300) / 10</var>
- <var id="TIME">randRange(3, 200)/10</var>
- <var id="DISP">roundTo(2, V_INIT * TIME + (1/2) * ACCEL * TIME * TIME)</var>
- <var id="V_FINAL">roundTo(2, V_INIT + ACCEL * TIME)</var>
- </div>
- </div>
-
-
- <div id="constant" data-type="accelerated" data-weight="1">
- <div class="vars" data-ensure="!(OMITTED === 'd' && UNKNOWN === 't') && !(OMITTED === 't' && UNKNOWN === 'd')">
- <var id="ACCEL">0</var>
- <var id="V_INIT">randRange(5, 25)</var>
- <var id="V_FINAL">V_INIT</var>
- <var id="TIME">randRange(1, 25)</var>
- <var id="DISP">TIME * V_INIT</var>
-
- <var id="PLUS_OR_MINUS_SOLUTION">false</var>
- </div>
- </div>
- </div>
-
-
- <div class="hints">
- <div data-if="OMITTED === 'd'" data-unwrap>
- <p><code>v_f = v_i + at</code></p>
-
- <div data-if="UNKNOWN === 'v_f'" data-unwrap>
- <p><code>v_f = <var>V_INIT</var> \frac{\text{m}}{\text{s}} + (<var>ACCEL</var> \frac{\text{m}}{\text{s}^2})(<var>TIME</var> \text{s})</code></p>
- <p><code>v_f = <var>roundTo(1, V_FINAL)</var> \frac{\text{m}}{\text{s}}</code></p>
- </div>
-
- <div data-if="UNKNOWN === 'v_i'" data-unwrap>
- <p><code>v_f - at = v_i</code></p>
- <p><code><var>V_FINAL</var> \frac{\text{m}}{\text{s}} - (<var>ACCEL</var> \frac{\text{m}}{\text{s}^2})(<var>TIME</var> \text{s}) = v_i</code></p>
- <p><code><var>roundTo(1, V_INIT)</var> \frac{\text{m}}{\text{s}} = v_i</code></p>
- </div>
-
- <div data-if="UNKNOWN === 'a'" data-unwrap>
- <p><code>\dfrac{v_f - v_i}{t} = a</code></p>
- <p><code>\dfrac{<var>V_FINAL</var> \frac{\text{m}}{\text{s}} - <var>V_INIT</var> \frac{\text{m}}{\text{s}}}{<var>TIME</var> \text{s}} = a</code></p>
- <p><code><var>roundTo(1, ACCEL)</var> \frac{\text{m}}{\text{s}^2} = a</code></p>
- </div>
-
- <div data-if="UNKNOWN === 't'" data-unwrap>
- <p><code>\dfrac{v_f - v_i}{a} = t</code></p>
- <p><code>\dfrac{<var>V_FINAL</var> \frac{\text{m}}{\text{s}} - <var>V_INIT</var> \frac{\text{m}}{\text{s}}}{<var>ACCEL</var> \frac{\text{m}}{\text{s}^2}} = t</code></p>
- <p><code><var>roundTo(1, TIME)</var> \text{s} = t</code></p>
- </div>
- </div>
-
- <div data-if="OMITTED === 'v_i'" data-unwrap>
- <p><code>d = v_f t - \frac{1}{2}at^2</code></p>
-
- <div data-if="UNKNOWN === 'd'" data-unwrap>
- <p><code>d = (<var>V_FINAL</var> \frac{\text{m}}{\text{s}})(<var>TIME</var> \text{s}) - \frac{1}{2}(<var>ACCEL</var> \frac{\text{m}}{\text{s}^2})(<var>TIME</var> \text{s})^2</code></p>
- <p><code>d = <var>roundTo(1, DISP)</var> \text{m}</code></p>
- </div>
-
- <div data-if="UNKNOWN === 'v_f'" data-unwrap>
- <p><code>\dfrac{d + \frac{1}{2} at^2}{t} = v_f</code></p>
- <p><code>\dfrac{<var>DISP</var> \text{m} + \frac{1}{2}(<var>ACCEL</var> \frac{\text{m}}{\text{s}^2})(<var>TIME</var> \text{s})^2}{<var>TIME</var> \text{s}} = v_f</code></p>
- <p><code><var>roundTo(1, V_FINAL)</var> \frac{\text{m}}{\text{s}} = v_f</code></p>
- </div>
-
- <div data-if="UNKNOWN === 'a'" data-unwrap>
- <p><code>\dfrac{d - v_f*t}{-\frac{1}{2}t^2} = a</code></p>
- <p><code>\dfrac{<var>DISP</var> \text{m} - (<var>V_FINAL</var> \frac{\text{m}}{\text{s}})(<var>TIME</var> \text{s})}{-\frac{1}{2}(<var>TIME</var> \text{s})^2} = a</code></p>
- <p><code><var>roundTo(1, ACCEL)</var> \frac{\text{m}}{\text{s}^2} = a</code></p>
- </div>
-
- <div data-if="UNKNOWN === 't'" data-unwrap>
- <p><code>0 = -\frac{1}{2}a*t^2 + v_f*t - d</code></p>
- <div>
- <p>By the quadratic formula:</p>
- <p><code>t = \dfrac{ -v_f \pm \sqrt{ v_f^2 - 2ad } }{-a}</code></p>
- </div>
- <p><code>t = \dfrac{-(<var>V_FINAL</var> \frac{\text{m}}{\text{s}}) \pm \sqrt{(<var>V_FINAL</var> \frac{\text{m}}{\text{s}})^2 - 2(<var>ACCEL</var> \frac{\text{m}}{\text{s}^2})(<var>DISP</var> \text{m})}}{-(<var>ACCEL</var> \frac{\text{m}}{\text{s}^2})}</code></p>
- <p data-if="QUADRATIC_TWO_SOLUTION">
- The quadratic has two solutions. Without making any assumptions about the direction of <code>v_i</code>,
- either one could be correct. Intuitively, you can imagine throwing an object upward or downward in such a way
- that they will both have the same downward velocity at the same point in space, but the one thrown downward
- will get there sooner.
- </p>
- <p data-if="QUADRATIC_TWO_SOLUTION">
- <code>t = <var>roundTo(1, ((-V_FINAL) + sqrt(V_FINAL * V_FINAL - 2 * ACCEL * DISP))/(-ACCEL))</var> \text{s}
- \text{ or } <var>roundTo(1, ((-V_FINAL) - sqrt(V_FINAL * V_FINAL - 2 * ACCEL * DISP))/(-ACCEL))</var> \text{s}</code>
- </p>
- <p data-if="!QUADRATIC_TWO_SOLUTION"><code>t = <var>TIME</var> \text{s}</code></p>
- </div>
- </div>
-
- <div data-if="OMITTED === 'v_f'" data-unwrap>
- <p><code>d = v_i t + \frac{1}{2}at^2</code></p>
-
- <div data-if="UNKNOWN === 'd'" data-unwrap>
- <p><code>d = (<var>V_INIT</var> \frac{\text{m}}{\text{s}})(<var>TIME</var> \text{s}) + \frac{1}{2}(<var>ACCEL</var> \frac{\text{m}}{\text{s}^2})(<var>TIME</var> \text{s})^2</code></p>
- <p><code>d = <var>roundTo(1, DISP)</var> \text{m}</code></p>
- </div>
-
- <div data-if="UNKNOWN === 'v_i'" data-unwrap>
- <p><code>\dfrac{d - \frac{1}{2}at^2}{t} = v_i</code></p>
- <p><code>\dfrac{<var>DISP</var> \text{m} - \frac{1}{2}(<var>ACCEL</var> \frac{\text{m}}{\text{s}^2})(<var>TIME</var> \text{s})^2}{<var>TIME</var> \text{s}} = v_i</code></p>
- <p><code><var>roundTo(1, V_INIT)</var> \frac{\text{m}}{\text{s}} = v_i</code></p>
- </div>
-
- <div data-if="UNKNOWN === 'a'" data-unwrap>
- <p><code>\dfrac{d - v_i t}{\frac{1}{2} t^2} = a</code></p>
- <p><code>\dfrac{<var>DISP</var> \text{m} - (<var>V_INIT</var> \frac{\text{m}}{\text{s}})(<var>TIME</var> \text{s})}{\frac{1}{2}(<var>TIME</var> \text{s})^2} = a</code></p>
- <p><code><var>roundTo(1, ACCEL)</var> \frac{\text{m}}{\text{s}^2} = a</code></p>
- </div>
-
- <div data-if="UNKNOWN === 't'" data-unwrap>
- <p><code>0 = \frac{1}{2} at^2 + v_i t - d</code></p>
- <div>
- <p>By the quadratic formula:</p>
- <p><code>t = \dfrac{ -v_i \pm \sqrt{v_i^2 + 2ad} }{a}</code></p>
- </div>
- <p><code>t = \dfrac{-(<var>V_INIT</var> \frac{\text{m}}{\text{s}}) \pm \sqrt{(<var>V_INIT</var> \frac{\text{m}}{\text{s}})^2 + 2(<var>ACCEL</var> \frac{\text{m}}{\text{s}^2})(<var>DISP</var> \text{m})}}{<var>ACCEL</var> \frac{\text{m}}{\text{s}^2}}</code></p>
- <p data-if="QUADRATIC_TWO_SOLUTION">
- The quadratic has two solutions. Without making any assumptions about the direction of <code>v_f</code>,
- either one could be correct. Intuitively, this is because an object moving upward at velocity <code>v</code>
- at one point in time will eventually be falling at the same speed (<code>-v</code>) at a different point in time.
- </p>
- <p data-if="QUADRATIC_TWO_SOLUTION">
- <code>t = <var>roundTo(1, ((-V_INIT) + sqrt(V_INIT * V_INIT + 2 * ACCEL * DISP))/ACCEL)</var> \text{s}
- \text{ or } <var>roundTo(1, ((-V_INIT) - sqrt(V_INIT * V_INIT + 2 * ACCEL * DISP))/ACCEL)</var> \text{s}</code>
- </p>
- <p data-if="!QUADRATIC_TWO_SOLUTION"><code>t = <var>TIME</var> \text{s}</code></p>
- </div>
- </div>
-
- <div data-if="OMITTED === 'a'" data-unwrap>
- <p><code>d = \frac{1}{2}(v_i + v_f)t</code></p>
-
- <div data-if="UNKNOWN === 'd'" data-unwrap>
- <p><code>d = \frac{1}{2}(<var>V_INIT</var> \frac{\text{m}}{\text{s}} + <var>V_FINAL</var> \frac{\text{m}}{\text{s}})(<var>TIME</var> \text{s})</code></p>
- <p><code>d = <var>roundTo(1, DISP)</var> \text{m}</code></p>
- </div>
-
- <div data-if="UNKNOWN === 'v_i'" data-unwrap>
- <p><code>\dfrac{2d}{t} - v_f = v_i</code></p>
- <p><code>\dfrac{2(<var>DISP</var> \text{m})}{<var>TIME</var> \text{s}} - <var>V_FINAL</var> \frac{\text{m}}{\text{s}} = v_i</code></p>
- <p><code><var>roundTo(1, V_INIT)</var> \frac{\text{m}}{\text{s}} = v_i</code></p>
- </div>
-
- <div data-if="UNKNOWN === 'v_f'" data-unwrap>
- <p><code>\dfrac{2d}{t} - v_i = v_f</code></p>
- <p><code>\dfrac{2(<var>DISP</var> \text{m})}{<var>TIME</var> \text{s}} - <var>V_INIT</var> \frac{\text{m}}{\text{s}} = v_f</code></p>
- <p><code><var>roundTo(1, V_FINAL)</var> \frac{\text{m}}{\text{s}} = v_f</code></p>
- </div>
-
- <div data-if="UNKNOWN === 't'" data-unwrap>
- <p><code>\dfrac{2d}{v_i + v_f} = t</code></p>
- <p><code>\dfrac{2(<var>DISP</var> \text{m})}{(<var>V_INIT</var> \frac{\text{m}}{\text{s}}) + (<var>V_FINAL</var> \frac{\text{m}}{\text{s}})} = t</code></p>
- <p><code><var>roundTo(1, TIME)</var> \text{s} = t</code></p>
- </div>
- </div>
-
- <div data-if="OMITTED === 't'" data-unwrap>
- <p><code>v_f^2 = v_i^2 + 2ad</code></p>
-
- <div data-if="UNKNOWN === 'd'" data-unwrap>
- <p><code>\dfrac{v_f^2 - v_i^2}{2a} = d</code></p>
- <p><code>\dfrac{(<var>V_FINAL</var> \frac{\text{m}}{\text{s}} )^2 - (<var>V_INIT</var> \frac{\text{m}}{\text{s}} )^2}{2(<var>ACCEL</var> \text{s})} = d</code></p>
- <p><code><var>roundTo(1, DISP)</var> \text{m} = d</code></p>
- </div>
-
- <div data-if="UNKNOWN === 'v_i'" data-unwrap>
- <p><code>\pm\sqrt{v_f^2 - 2ad} = v_i</code></p>
- <p><code>\pm\sqrt{(<var>V_FINAL</var> \frac{\text{m}}{\text{s}})^2 - 2(<var>ACCEL</var> \frac{\text{m}}{\text{s}^2})(<var>DISP</var> \text{m})} = v_i</code></p>
- <p data-if="ACCEL !== 0">
- Without making any assumptions about <code>t</code>, either direction for <code>v_i</code> could be correct.
- Imagine throwing an object upward at velocity <code>v</code> compared to throwing it downward at the same
- speed (<code>-v</code>). In both cases it will reach the same final velocity <code>v_f</code> at the same
- point in space; it will just take different amounts of time to get there.
- </p>
- <p><code>v_i = <var>roundTo(1, V_INIT)</var> \frac{\text{m}}{\text{s}} \text{ or } <var>roundTo(1, -V_INIT)</var> \frac{\text{m}}{\text{s}}</code></p>
- <p data-if="ACCEL === 0">However, we also know <code>a = 0 \frac{\text{m}}{\text{s}^2}</code></p>
- <p data-if="ACCEL === 0">We know intuitively that with zero acceleration <code>v_i</code> must equal <code>v_f</code>, so <code>v_i = <var>roundTo(1, V_INIT)</var> \frac{\text{m}}{\text{s}}</code></p>
- </div>
-
- <div data-if="UNKNOWN === 'v_f'" data-unwrap>
- <p><code>v_f = \pm\sqrt{v_i^2 + 2ad}</code></p>
- <p><code>v_f = \pm\sqrt{(<var>V_INIT</var> \frac{\text{m}}{\text{s}})^2 + 2(<var>ACCEL</var> \frac{\text{m}}{\text{s}^2})(<var>DISP</var> \text{m})}</code></p>
- <p data-if="ACCEL !== 0">
- Without making any assumptions about <code>t</code>, either direction for <code>v_f</code> could be correct.
- Imagine an object traveling upward at velocity <code>v_i</code>. It will reach a particular velocity
- <code>v</code> on the way up, then reach the same speed in the opposite direction (<code>-v</code>) on the
- way down at the same point in space; it will just take a different amount of time to get there.
- </p>
- <p><code>v_f = <var>roundTo(1, V_FINAL)</var> \frac{\text{m}}{\text{s}} \text{ or } <var>roundTo(1, -V_FINAL)</var> \frac{\text{m}}{\text{s}}</code></p>
- <p data-if="ACCEL === 0">However, we also know <code>a = 0 \frac{\text{m}}{\text{s}^2}</code></p>
- <p data-if="ACCEL === 0">We know intuitively that with zero acceleration <code>v_f</code> must equal <code>v_i</code>, so <code>v_f = <var>roundTo(1, V_FINAL)</var> \frac{\text{m}}{\text{s}}</code></p>
- </div>
-
- <div data-if="UNKNOWN === 'a'" data-unwrap>
- <p><code>\dfrac{v_f^2 - v_i^2}{2d} = a</code></p>
- <p><code>\dfrac{(<var>V_FINAL</var> \frac{\text{m}}{\text{s}})^2 - (<var>V_INIT</var> \frac{\text{m}}{\text{s}})^2}{2(<var>DISP</var> \text{m})} = a</code></p>
- <p><code><var>roundTo(1, ACCEL)</var> \frac{\text{m}}{\text{s}^2} = a</code></p>
- </div>
- </div>
- </div>
- </div>
-</body>
-</html>
View
2 exercises/least_common_multiple_and_greatest_common_divisor_word_problems.html
@@ -604,7 +604,7 @@
</p>
</div>
<p class="question">
- What is the greatest number of sets of office supplies <var>person(1)</var> can make?
+ What is the greatest number of identical sets <var>person(1)</var> can make using all the supplies?
</p>
<p class="solution" data-forms="integer"><var>GCD</var></p>
View
7 exercises/matrix_transpose.html
@@ -27,9 +27,12 @@
</p>
<div class="hints">
- <div>
+ <p>
+ To find the transpose, swap the rows and columns.
+ </p>
+ <p>
<code><var>PRETTY_MAT_ID</var>^{T}</code> = <code><var>PRETTY_SOLN_MAT</var></code>
- </div>
+ </p>
</div>
<div class="solution" data-type="multiple">
View
179 exercises/ordering_objects.html
@@ -1,179 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math graphie word-problems interactive">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Ordering objects</title>
- <script src="../khan-exercise.js"></script>
- <style>
- .sortable {
- padding: 13px;
- }
-
- .sortable > ul > li {
- background-color: #eee;
- border: 1px solid #eee;
- width: 110px;
- height: 110px;
- }
- .sort-key {
- visibility: hidden;
- position: absolute;
- }
- </style>
-</head>
-<body>
- <div class="exercise">
- <div class="vars">
- <var id="SHAPE">randFromArray(["square", "circle", "triangle"])</var>
- <var id="COLORS">shuffle(["#aec6f4", "#fdcf76", "#8ed4b8", "#fd79d4"])</var>
- <var id="DRAW">{}</var>
- <var id="SORTER">createSorter()</var>
- </div>
-
- <p class="question"></p>
-
- <div class="problem">
- <div class="graphie">
- DRAW.square = function(x, y, size, color) {
- KhanUtil.currentGraph.path([[x - size, y + size], [x + size, y + size], [x + size, y - size],
- [x - size, y - size], true ],
- { strokeWidth: 2, stroke: "black", fill: color });
- };
- DRAW.circle = function(x, y, size, color) {
- KhanUtil.currentGraph.circle([x, y], size, { strokeWidth: 2, stroke: "black", fill: color });
- };
- DRAW.triangle = function(x, y, size, color) {
- KhanUtil.currentGraph.path([[x, y + size], [x + (2 * size) / sqrt(3), y - size / sqrt(3)],
- [x - (2 * size) / sqrt(3), y - size / sqrt(3)], true],
- { strokeWidth: 2, stroke: "black", fill: color });
- };
- </div>
- <ul id="sortable">
- <li data-each="SIZES as I, SIZE">
- <span class="sort-key"><var>SIZE</var></span>
- <div class="graphie add-unique-id">
- $(".add-unique-id").eq(I).attr("id", "unique-" + I);
- init({ range: [[-11, 11], [-11, 11]], scale: [5, 5] });
- DRAW[SHAPE](0, 0, SIZE, COLORS[I]);
- </div>
- </li>
- </ul>
- <var>SORTER.init("sortable")</var>
- </div>
-
- <div class="problems">
- <div id="small-to-large">
- <div class="vars" data-apply="appendVars">
- <var id="SIZES" data-ensure="SIZES.join(',') !== sortNumbers(SIZES).join(',')">
- shuffle([4, 5, 6, 7, 8, 9], 4)
- </var>
- <var id="SOLUTION">_.map(sortNumbers(SIZES), function(el) {
- return "ABCD"[_.indexOf(SIZES, el)];
- })</var>
- </div>
-
- <p class="question">
- Order the <var>plural(SHAPE)</var> from smallest to largest:
- </p>
-
- <div class="solution" data-type="custom">
- <div class="instruction">
- Drag the <var>plural(SHAPE)</var> left and right so they are in order from smallest to largest
- </div>
- <div class="guess">SORTER.getContent()</div>
- <div class="validator-function">
- return guess.join(",") === SIZES.sort().join(",");
- </div>
- <div class="show-guess">
- SORTER.setContent(guess);
- </div>
- </div>
-
- <div class="hints">
- <div data-each="sortNumbers(SIZES) as I, SIZE">
- <div data-if="I === 0" class="graphie">
- _(4).times(function(i) {
- $("#unique-" + i).data("graphie").label([0, 0], "ABCD"[i]);
- });
- </div>
- <p>
- The
- <span data-if="I === 0">smallest</span>
- <span data-else-if="I === SIZES.length - 1">largest</span>
- <span data-else>next smallest</span>
- is <var>SHAPE</var> <code><var>"ABCD"[_.indexOf(SIZES, SIZE)]</var>
- </code><span data-if="I === 0">, so it goes on the left</span><span data-else-if="I === SIZES.length - 1">, so it goes on the right</span>.
- </p>
-
- <div class="graphie">
- init({ range: [[-11, 80], [-11, 11]], scale: [5, 5] });
- var x = 0;
- _.each(_.first(sortNumbers(SIZES), I + 1), function(size, i) {
- DRAW[SHAPE](x, 0, size, COLORS[_.indexOf(SIZES, size)]);
- label([x, 0], "ABCD"[_.indexOf(SIZES, size)]);
- x += 22;
- });
- </div>
- </div>
- </div>
- </div>
-
- <div id="large-to-small">
- <div class="vars" data-apply="appendVars">
- <var id="SIZES" data-ensure="SIZES.join(',') !== sortNumbers(SIZES).reverse().join(',')">
- shuffle([4, 5, 6, 7, 8, 9], 4)
- </var>
- <var id="SOLUTION">_.map(sortNumbers(SIZES).reverse(), function(el) {
- return "ABCD"[_.indexOf(SIZES, el)];
- })</var>
- </div>
-
- <p class="question">
- Order the <var>plural(SHAPE)</var> from largest to smallest:
- </p>
-
- <div class="solution" data-type="custom">
- <div class="instruction">
- Drag the <var>plural(SHAPE)</var> left and right so they are in order from largest to smallest
- </div>
- <div class="guess">SORTER.getContent()</div>
- <div class="validator-function">
- return guess.join(",") === SIZES.sort().reverse().join(",");
- </div>
- <div class="show-guess">
- SORTER.setContent(guess);
- </div>
- </div>
-
- <div class="hints">
- <div data-each="sortNumbers(SIZES).reverse() as I, SIZE">
- <div data-if="I === 0" class="graphie">
- _(4).times(function(i) {
- $("#unique-" + i).data("graphie").label([0, 0], "ABCD"[i]);
- });
- </div>
- <p>
- The
- <span data-if="I === 0">largest</span>
- <span data-else-if="I === SIZES.length - 1">smallest</span>
- <span data-else>next largest</span>
- is <var>SHAPE</var> <code><var>"ABCD"[_.indexOf(SIZES, SIZE)]</var>
- </code><span data-if="I === 0">, so it goes on the left</span><span data-else-if="I === SIZES.length - 1">, so it goes on the right</span>.
- </p>
-
- <div class="graphie">
- init({ range: [[-11, 80], [-11, 11]], scale: [5, 5] });
- var x = 0;
- _.each(_.first(sortNumbers(SIZES).reverse(), I + 1), function(size, i) {
- DRAW[SHAPE](x, 0, size, COLORS[_.indexOf(SIZES, size)]);
- label([x, 0], "ABCD"[_.indexOf(SIZES, size)]);
- x += 22;
- });
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
-</body>
-</html>
View
20 exercises/pre-algebra_challenge.html
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Pre-algebra challenge</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise" data-name="order_of_operations"></div>
- <div class="exercise" data-name="multiplying_and_dividing_negative_numbers"></div>
- <div class="exercise" data-name="scientific_notation"></div>
- <div class="exercise" data-name="exponents_3"></div>
- <div class="exercise" data-name="units"></div>
- <div class="exercise" data-name="simplifying_radicals"></div>
- <div class="exercise" data-name="ordering_numbers"></div>
- <div class="exercise" data-name="exponents_2"></div>
- <div class="exercise" data-name="multiplying_fractions"></div>
- <div class="exercise" data-name="dividing_fractions"></div>
-</body>
-</html>
View
13 exercises/similar_triangles_review.html
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Similar triangles review</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise" data-name="similar_triangles_1"></div>
- <div class="exercise" data-name="similar_triangles_2"></div>
- <div class="exercise" data-name="solving_similar_triangles_1"></div>
-</body>
-</html>
View
34 exercises/simplifying_rational_expressions_1.html
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math graphie ast math-model simplifying-expressions expr-helpers expr-normal-form simplify steps-helpers factoring-expressions subhints">
-<head>
- <meta charset="UTF-8" />
- <title>Simplifying rational expressions 1</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise">
- <div class="vars">
- <var id="W">{op:"var", args:["w"]}</var>
- <var id="X">{op:"var", args:["x"]}</var>
- <var id="Y">{op:"var", args:["y"]}</var>
- <var id="Z">{op:"var", args:["z"]}</var>
- <var id="PROBLEM">genSimplifyingExpressionsExercise(4, 2, [2, 3, 5, 7], [X, Y], [0, 1, 2, 3])</var>
- <var id="SOLUTION">solveSimplifyingExpressionsExercise(PROBLEM)</var>-->
- </div>
- <div class="problems">
- <div>
- <p class="problem">Simplify the following expression:</p>
- <p class="question"><code><var>format(PROBLEM)</var></code></p>
- <p class="solution"><code><var>format(SOLUTION.solution)</var></code></p>
-
- <ul class="choices" data-none="true" data-show="5">
- <li data-each="SOLUTION.choices as key, value"><code><var>format(value)</var></code></li>
- </ul>
- </div>
- </div>
- <div class="hints">
- <div data-each="SOLUTION.hints as key, value"><var>value</var></div>
- </div>
- </div>
-</body>
-</html>
View
34 exercises/simplifying_rational_expressions_2.html
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math graphie math-model simplifying-expressions simplify factoring-expressions subhints">
-<head>
- <meta charset="UTF-8" />
- <title>Simplifying rational expressions 2</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise">
- <div class="vars">
- <var id="W">{op:"var", args:["w"]}</var>
- <var id="X">{op:"var", args:["x"]}</var>
- <var id="Y">{op:"var", args:["y"]}</var>
- <var id="Z">{op:"var", args:["z"]}</var>
- <var id="PROBLEM">genSimplifyingExpressionsExercise(4, 2, [2, 3, 5, 7], [X, Y], [0, 1, 2, 3], true)</var>
- <var id="SOLUTION">solveSimplifyingExpressionsExercise(PROBLEM)</var>