Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove old matrix experiment files.

In the qhints experiments (defined_and_undefined_matrix_operations.html, matrix_dimensions.html), choose the qhints alternatives. They performed marginally better, but not by a statistically significant amount.

In the video hint vs. solution only vs. steps only vs. traditional hints, choose traditional hints, with the goal of eventually extracting out the text into subhints. The steps only alternative performed better than the other alternatives in the new proficiency experiment, and roughly tied for best performance in the first review experiment (not sure if statistically significant). However, I suspect that some users learn better from having explanations in text, so having the text available in subhints sounds like the right way to go.

Auditors: eater, alpert
  • Loading branch information...
commit a239f801654a84a9dc442ba8e31409468e34e862 1 parent 059776b
Stephanie H. Chang authored
View
42 exercises/defined_and_undefined_matrix_operations.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html data-require="math matrix">
+<html data-require="math matrix qhints">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Defined and undefined matrix operations</title>
@@ -75,6 +75,26 @@
for their <span data-if="OPERATION === '+'">sum</span><span data-else>difference</span> to be defined.
</p>
</div>
+ <div class="qhint">
+ <p>
+ Do <code><var>PRETTY_MAT_1_ID</var></code> and <code><var>PRETTY_MAT_2_ID</var></code> have the same number of rows?
+ </p>
+ <span class="qhint-answer"><var>DIM_1 === DIM_3 ? "Yes" : "No"</var></span>
+ <p class="qhint-input">
+ <input class="simple-button" type="button" value="Yes"/>
+ <input class="simple-button" type="button" value="No"/>
+ </p>
+ </div>
+ <div class="qhint">
+ <p>
+ Do <code><var>PRETTY_MAT_1_ID</var></code> and <code><var>PRETTY_MAT_2_ID</var></code> have the same number of columns?
+ </p>
+ <span class="qhint-answer"><var>DIM_2 === DIM_4 ? "Yes" : "No"</var></span>
+ <p class="qhint-input">
+ <input class="simple-button" type="button" value="Yes"/>
+ <input class="simple-button" type="button" value="No"/>
+ </p>
+ </div>
<div>
<p>
Since <code><var>PRETTY_MAT_1_ID</var></code> has <span data-if="DEFINED">the same</span><span data-else>different</span> dimensions <code>(<var>DIM_1 + "\\times" + DIM_2</var>)</code> <span data-if="DEFINED">as</span><span data-else>from</span> <code><var>PRETTY_MAT_2_ID</var></code> <code>(<var>DIM_3 + "\\times" + DIM_4</var>)</code>,
@@ -108,6 +128,26 @@
If the two matrices have dimensions <code>(\blue m \times \red n)</code> and <code>(\red p \times \green q)</code>, then <code>\red n</code> (number of columns in the first matrix) must equal <code>\red p</code> (number of rows in the second matrix) for their product to be defined.
</p>
</div>
+ <div class="qhint">
+ <p>
+ How many columns does the first matrix, <code><var>PRETTY_MAT_1_ID</var></code>, have?
+ </p>
+ <span class="qhint-answer"><var>DIM_2</var></span>
+ <p class="qhint-input">
+ <input type="text" value=""/>
+ <input type="submit" value="Check"/>
+ </p>
+ </div>
+ <div class="qhint">
+ <p>
+ How many rows does the second matrix, <code><var>PRETTY_MAT_2_ID</var></code>, have?
+ </p>
+ <span class="qhint-answer"><var>DIM_3</var></span>
+ <p class="qhint-input">
+ <input type="text" value=""/>
+ <input type="submit" value="Check"/>
+ </p>
+ </div>
<div>
Since <code><var>PRETTY_MAT_1_ID</var></code> has <span data-if="DEFINED">the same</span><span data-else>a different</span> number of columns (<var>DIM_2</var>) <span data-if="DEFINED">as</span><span data-else>than</span> <code><var>PRETTY_MAT_2_ID</var></code> has rows (<var>DIM_3</var>), <code><var>PRETTY_MAT_1_ID + PRETTY_MAT_2_ID</var></code> is <span data-if="!DEFINED">not</span> defined.
</div>
View
160 exercises/defined_and_undefined_matrix_operations_alternative.html
@@ -1,160 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math matrix qhints">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Defined and undefined matrix operations</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise">
-
- <div class="vars" data-ensure="!(DIM_1 === 1 && DIM_2 === 1) && !(DIM_3 === 1 && DIM_4 === 1) && (PRETTY_MAT_1_ID !== PRETTY_MAT_2_ID)">
- <var id="ANSWER">DEFINED ? "Yes" : "No"</var>
-
- <var id="MAT_1">makeMatrix(randRange(-2, 4, DIM_1, DIM_2))</var>
- <var id="MAT_2">makeMatrix(randRange(-2, 4, DIM_3, DIM_4))</var>
-
- <var id="PRETTY_MAT_1_ID">"\\textbf " + randFromArray("ABCDEF")</var>
- <var id="PRETTY_MAT_2_ID">"\\textbf " + randFromArray("ABCDEF")</var>
-
- <var id="PRETTY_MAT_1">
- printSimpleMatrix(MAT_1)
- </var>
- <var id="PRETTY_MAT_2">
- printSimpleMatrix(MAT_2)
- </var>
- </div>
-
- <div class="problem">
- <p>
- <code><var>PRETTY_MAT_1_ID</var> = <var>PRETTY_MAT_1</var></code>
- </p>
- <p>
- <code><var>PRETTY_MAT_2_ID</var> = <var>PRETTY_MAT_2</var></code>
- </p>
- </div>
-
- <p class="question">
- Is <code><var>PRETTY_MAT_1_ID + OPERATION + PRETTY_MAT_2_ID</var></code> defined?
- </p>
-
- <p class="solution"><var>ANSWER</var></p>
- <ul class="choices" data-category="true">
- <li>Yes</li>
- <li>No</li>
- </ul>
-
- <div class="problems">
- <div id="addition-subtraction">
- <div class="vars" data-apply="prependVars">
- <var id="DEFINED">randRange(0, 1)</var>
- <var id="DIM_1">randRange(1, 3)</var>
- <var id="DIM_2">randRange(1, 3)</var>
- <var id="DIM_3">DIM_1</var>
- <var id="DIM_4">
- DEFINED ? DIM_2 : randRangeExclude(1, 3, [DIM_2])
- </var>
- <var id="OPERATION">randFromArray("+-")</var>
- </div>
-
- <div class="hints">
- <div>
- <p>
- In order for <span data-if="OPERATION === '+'">addition</span><span data-else>subtraction</span> of two matrices to be defined, the matrices must have the same dimensions.
- </p>
- <p>
- If <code><var>PRETTY_MAT_1_ID</var></code> is of dimension <code>(\blue m \times \red n)</code> and <code><var>PRETTY_MAT_2_ID</var></code> is of dimension <code>(\blue p \times \red q)</code>, then:
- </p>
- <p>
- 1. <code>\blue m</code> (number of rows in <code><var>PRETTY_MAT_1_ID</var></code>) must equal <code>\blue p</code> (number of rows in <code><var>PRETTY_MAT_2_ID</var></code>) and
- </p>
- <p>
- 2. <code>\red n</code> (number of columns in <code><var>PRETTY_MAT_1_ID</var></code>) must equal <code>\red q</code> (number of columns in <code><var>PRETTY_MAT_2_ID</var></code>)
- </p>
- <p>
- for their <span data-if="OPERATION === '+'">sum</span><span data-else>difference</span> to be defined.
- </p>
- </div>
- <div class="qhint">
- <p>
- Do <code><var>PRETTY_MAT_1_ID</var></code> and <code><var>PRETTY_MAT_2_ID</var></code> have the same number of rows?
- </p>
- <span class="qhint-answer"><var>DIM_1 === DIM_3 ? "Yes" : "No"</var></span>
- <p class="qhint-input">
- <input class="simple-button" type="button" value="Yes"/>
- <input class="simple-button" type="button" value="No"/>
- </p>
- </div>
- <div class="qhint">
- <p>
- Do <code><var>PRETTY_MAT_1_ID</var></code> and <code><var>PRETTY_MAT_2_ID</var></code> have the same number of columns?
- </p>
- <span class="qhint-answer"><var>DIM_2 === DIM_4 ? "Yes" : "No"</var></span>
- <p class="qhint-input">
- <input class="simple-button" type="button" value="Yes"/>
- <input class="simple-button" type="button" value="No"/>
- </p>
- </div>
- <div>
- <p>
- Since <code><var>PRETTY_MAT_1_ID</var></code> has <span data-if="DEFINED">the same</span><span data-else>different</span> dimensions <code>(<var>DIM_1 + "\\times" + DIM_2</var>)</code> <span data-if="DEFINED">as</span><span data-else>from</span> <code><var>PRETTY_MAT_2_ID</var></code> <code>(<var>DIM_3 + "\\times" + DIM_4</var>)</code>,
- <p>
- <code><var>PRETTY_MAT_1_ID + OPERATION + PRETTY_MAT_2_ID</var></code> is <span data-if="!DEFINED">not</span> defined.
- </p>
- </div>
- </div>
- </div>
-
- <div id="multiplication">
- <div class="vars" data-apply="prependVars">
- <var id="DEFINED">randRange(0, 1)</var>
- <var id="DIM_1">randRange(1, 3)</var>
- <var id="DIM_2">randRange(1, 3)</var>
- <var id="DIM_3">
- DEFINED ? DIM_2 : randRangeExclude(1, 3, [DIM_2])
- </var>
- <var id="DIM_4">randRange(1, 3)</var>
- <var id="OPERATION">""</var>
- </div>
-
- <div class="hints">
- <div>
- <p>
- In order for multiplication of two matrices to be defined, the two inner dimensions must be equal.
- </p>
- </div>
- <div>
- <p>
- If the two matrices have dimensions <code>(\blue m \times \red n)</code> and <code>(\red p \times \green q)</code>, then <code>\red n</code> (number of columns in the first matrix) must equal <code>\red p</code> (number of rows in the second matrix) for their product to be defined.
- </p>
- </div>
- <div class="qhint">
- <p>
- How many columns does the first matrix, <code><var>PRETTY_MAT_1_ID</var></code>, have?
- </p>
- <span class="qhint-answer"><var>DIM_2</var></span>
- <p class="qhint-input">
- <input type="text" value=""/>
- <input type="submit" value="Check"/>
- </p>
- </div>
- <div class="qhint">
- <p>
- How many rows does the second matrix, <code><var>PRETTY_MAT_2_ID</var></code>, have?
- </p>
- <span class="qhint-answer"><var>DIM_3</var></span>
- <p class="qhint-input">
- <input type="text" value=""/>
- <input type="submit" value="Check"/>
- </p>
- </div>
- <div>
- Since <code><var>PRETTY_MAT_1_ID</var></code> has <span data-if="DEFINED">the same</span><span data-else>a different</span> number of columns (<var>DIM_2</var>) <span data-if="DEFINED">as</span><span data-else>than</span> <code><var>PRETTY_MAT_2_ID</var></code> has rows (<var>DIM_3</var>), <code><var>PRETTY_MAT_1_ID + PRETTY_MAT_2_ID</var></code> is <span data-if="!DEFINED">not</span> defined.
- </div>
- </div>
- </div>
- </div>
-
- </div>
-</body>
-</html>
View
19 exercises/matrix_dimensions.html
@@ -38,14 +38,25 @@
</div>
<div class="hints">
- <div>
+ <div class="qhint">
<p>
- The first dimension is the number of rows in the matrix. <code><var>PRETTY_MAT_ID</var></code> has <var>DIM_1</var> rows.
+ The first dimension is the number of rows in the matrix. How many rows does <code><var>PRETTY_MAT_ID</var></code> have?
+ </p>
+ <span class="qhint-answer"><var>DIM_1</var></span>
+ <p class="qhint-input">
+ <input type="text" value=""/>
+ <input type="submit" value="Check"/>
</p>
</div>
- <div>
+ <div class="qhint">
<p>
- The second dimension is the number of columns in the matrix. <code><var>PRETTY_MAT_ID</var></code> has <var>DIM_2</var> columns.
+ The second dimension is the number of columns in the matrix. How many columns does <code><var>PRETTY_MAT_ID</var></code> have?
+ </p>
+ <span class="qhint-answer"><var>DIM_2</var></span>
+ <p class="qhint-input">
+ <input type="text" value=""/>
+ <input type="submit" value="Check"/>
+ </p>
</div>
<div>
So, <code><var>PRETTY_MAT_ID</var></code> is a <var>DIM_1</var> <code>\times</code> <var>DIM_2</var> matrix.
View
67 exercises/matrix_dimensions_alternative.html
@@ -1,67 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math matrix qhints">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Matrix dimensions</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise">
- <div class="vars" data-ensure="!(DIM_1 === 1 && DIM_2 === 1)">
- <var id="DIM_1">randRange(1, 4)</var>
- <var id="DIM_2">randRange(1, 4)</var>
- <var id="MAT_A">makeMatrix(randRange(-2, 4, DIM_1, DIM_2))</var>
-
- <var id="PRETTY_MAT_ID">"\\textbf " + randFromArray("ABCDEF")</var>
- <var id="PRETTY_MAT_A">
- printSimpleMatrix(MAT_A)
- </var>
- </div>
- <div class="problems">
- <div>
- <div class="problem">
- <p>
- <code><var>PRETTY_MAT_ID</var> = <var>PRETTY_MAT_A</var></code>
- </p>
- </div>
-
- <p class="question">
- What are the dimensions of matrix <code><var>PRETTY_MAT_ID</var></code>?
- </p>
-
- <div class="solution" data-type="multiple">
- <span class="sol short20" data-forms="integer"><var>DIM_1</var></span>
- <code>\times</code>
- <span class="sol short20" data-forms="integer"><var>DIM_2</var></span>
- </div>
- </div>
- </div>
-
- <div class="hints">
- <div class="qhint">
- <p>
- The first dimension is the number of rows in the matrix. How many rows does <code><var>PRETTY_MAT_ID</var></code> have?
- </p>
- <span class="qhint-answer"><var>DIM_1</var></span>
- <p class="qhint-input">
- <input type="text" value=""/>
- <input type="submit" value="Check"/>
- </p>
- </div>
- <div class="qhint">
- <p>
- The second dimension is the number of columns in the matrix. How many columns does <code><var>PRETTY_MAT_ID</var></code> have?
- </p>
- <span class="qhint-answer"><var>DIM_2</var></span>
- <p class="qhint-input">
- <input type="text" value=""/>
- <input type="submit" value="Check"/>
- </p>
- </div>
- <div>
- So, <code><var>PRETTY_MAT_ID</var></code> is a <var>DIM_1</var> <code>\times</code> <var>DIM_2</var> matrix.
- </div>
- </div>
- </div>
-</body>
-</html>
View
116 exercises/multiplying_a_matrix_by_a_matrix_solution_only.html
@@ -1,116 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math matrix matrix-input">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Multiplying a matrix by a matrix</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise">
-
- <div class="vars" data-ensure="PRETTY_MAT_1_ID !== PRETTY_MAT_2_ID">
- <var id="DIM_3">DIM_2</var>
- <var id="MAT_1">makeMatrix(randRange(-2, 5, DIM_1, DIM_2))</var>
- <var id="MAT_2">makeMatrix(randRange(-2, 5, DIM_3, DIM_4))</var>
-
- <var id="SOLN_MAT">
- matrixMult(MAT_1, MAT_2)
- </var>
- <var id="PADDED_SOLN_MAT">matrixPad(SOLN_MAT, 3, 3)</var>
-
- <var id="PRETTY_MAT_1_ID">"\\textbf " + randFromArray("ABCDEF")</var>
- <var id="PRETTY_MAT_2_ID">"\\textbf " + randFromArray("ABCDEF")</var>
-
- <!-- For generating hint matrices-->
- <var id="ROW_COLORS">[GREEN, BLUE, GRAY]</var>
- <var id="COL_COLORS">[ORANGE, "#DF0030", "#9D38BD"]</var>
-
- <var id="FINAL_HINT_MAT">
- makeMultHintMatrix(MAT_1, MAT_2, ROW_COLORS, COL_COLORS)
- </var>
-
- </div>
-
- <div class="problem">
- <p>
- <code><var>PRETTY_MAT_1_ID</var> = <var>printSimpleMatrix(MAT_1)</var></code>
- </p>
- <p>
- <code><var>PRETTY_MAT_2_ID</var> = <var>printSimpleMatrix(MAT_2)</var></code>
- </p>
- </div>
-
- <p class="question">
- What is <code><var>PRETTY_MAT_1_ID + PRETTY_MAT_2_ID</var></code>?
- </p>
-
- <div class="hints">
- <div>
- <p>The solution is:</p>
- <div>
- <code>
- <var>printSimpleMatrix(SOLN_MAT)</var>
- </code>
- </div>
- </div>
- </div>
-
- <div class="solution" data-type="multiple">
- <div data-each="PADDED_SOLN_MAT as row" class="matrix-row">
- <span data-each="row as elem">
- <span data-if="elem !== ''" class="sol" data-forms="integer">
- <var>elem</var>
- </span>
- <span data-else data-type="text" class="sol">
- <var>elem</var>
- </span>
- </span>
- </div>
- </div>
-
- <div class="problems">
- <!-- 2x2 solution dimensions -->
- <div id="2x2-2x2">
- <div class="vars" data-apply="prependVars">
- <var id="DIM_1">2</var>
- <var id="DIM_2">2</var>
- <var id="DIM_4">2</var>
- </div>
- </div>
- <div id="2x3-3x2">
- <div class="vars" data-apply="prependVars">
- <var id="DIM_1">2</var>
- <var id="DIM_2">3</var>
- <var id="DIM_4">2</var>
- </div>
- </div>
-
- <!-- 2x3 solution dimensions -->
- <div id="2x2-2x3">
- <div class="vars" data-apply="prependVars">
- <var id="DIM_1">2</var>
- <var id="DIM_2">2</var>
- <var id="DIM_4">3</var>
- </div>
- </div>
-
- <!-- 3x2 solution dimensions -->
- <div id="3x1-1x2">
- <div class="vars" data-apply="prependVars">
- <var id="DIM_1">3</var>
- <var id="DIM_2">1</var>
- <var id="DIM_4">2</var>
- </div>
- </div>
- <div id="3x2-2x2">
- <div class="vars" data-apply="prependVars">
- <var id="DIM_1">3</var>
- <var id="DIM_2">2</var>
- <var id="DIM_4">2</var>
- </div>
- </div>
- </div>
-
- </div>
-</body>
-</html>
View
176 exercises/multiplying_a_matrix_by_a_matrix_steps_only.html
@@ -1,176 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math matrix matrix-input">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Multiplying a matrix by a matrix</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise">
-
- <div class="vars" data-ensure="PRETTY_MAT_1_ID !== PRETTY_MAT_2_ID">
- <var id="DIM_3">DIM_2</var>
- <var id="MAT_1">makeMatrix(randRange(-2, 5, DIM_1, DIM_2))</var>
- <var id="MAT_2">makeMatrix(randRange(-2, 5, DIM_3, DIM_4))</var>
-
- <var id="SOLN_MAT">
- matrixMult(MAT_1, MAT_2)
- </var>
- <var id="PADDED_SOLN_MAT">matrixPad(SOLN_MAT, 3, 3)</var>
-
- <var id="PRETTY_MAT_1_ID">"\\textbf " + randFromArray("ABCDEF")</var>
- <var id="PRETTY_MAT_2_ID">"\\textbf " + randFromArray("ABCDEF")</var>
-
- <!-- For generating hint matrices-->
- <var id="ROW_COLORS">[GREEN, BLUE, GRAY]</var>
- <var id="COL_COLORS">[ORANGE, "#DF0030", "#9D38BD"]</var>
-
- <var id="FINAL_HINT_MAT">
- makeMultHintMatrix(MAT_1, MAT_2, ROW_COLORS, COL_COLORS)
- </var>
-
- </div>
-
- <div class="problem">
- <p>
- <code><var>PRETTY_MAT_1_ID</var> = <var>printSimpleMatrix(MAT_1)</var></code>
- </p>
- <p>
- <code><var>PRETTY_MAT_2_ID</var> = <var>printSimpleMatrix(MAT_2)</var></code>
- </p>
- </div>
-
- <p class="question">
- What is <code><var>PRETTY_MAT_1_ID + PRETTY_MAT_2_ID</var></code>?
- </p>
-
- <div class="hints">
- <div>
- <p>
- <code>
- <var>PRETTY_MAT_1_ID + PRETTY_MAT_2_ID</var>
- =
- <var>printColoredDimMatrix(MAT_1, ROW_COLORS, true)</var>
- <var>printColoredDimMatrix(MAT_2, COL_COLORS, false)</var>
- =
- <var>
- printSimpleMatrix(maskMatrix(FINAL_HINT_MAT, []))
- </var>
- </code>
- </p>
- </div>
- <div>
- <p>
- <code>
- =
- <var>
- printSimpleMatrix(
- maskMatrix(FINAL_HINT_MAT, [[1, 1]])
- )
- </var>
- </code>
- </p>
- </div>
- <div>
- <p>
- <code>
- =
- <var>
- printSimpleMatrix(
- maskMatrix(FINAL_HINT_MAT, [[1, 1], [2, 1]])
- )
- </var>
- </code>
- </p>
- </div>
- <div>
- <p>
- <code>
- =
- <var>
- printSimpleMatrix(
- maskMatrix(FINAL_HINT_MAT, [[1, 1], [2, 1], [1, 2]])
- )
- </var>
- </code>
- </p>
- </div>
- <div>
- <p>
- <code>
- =
- <var>
- printSimpleMatrix(FINAL_HINT_MAT)
- </var>
- </code>
- </p>
- </div>
- <div>
- <div>
- <code>
- =
- <var>printSimpleMatrix(SOLN_MAT)</var>
- </code>
- </div>
- </div>
- </div>
-
- <div class="solution" data-type="multiple">
- <div data-each="PADDED_SOLN_MAT as row" class="matrix-row">
- <span data-each="row as elem">
- <span data-if="elem !== ''" class="sol" data-forms="integer">
- <var>elem</var>
- </span>
- <span data-else data-type="text" class="sol">
- <var>elem</var>
- </span>
- </span>
- </div>
- </div>
-
- <div class="problems">
- <!-- 2x2 solution dimensions -->
- <div id="2x2-2x2">
- <div class="vars" data-apply="prependVars">
- <var id="DIM_1">2</var>
- <var id="DIM_2">2</var>
- <var id="DIM_4">2</var>
- </div>
- </div>
- <div id="2x3-3x2">
- <div class="vars" data-apply="prependVars">
- <var id="DIM_1">2</var>
- <var id="DIM_2">3</var>
- <var id="DIM_4">2</var>
- </div>
- </div>
-
- <!-- 2x3 solution dimensions -->
- <div id="2x2-2x3">
- <div class="vars" data-apply="prependVars">
- <var id="DIM_1">2</var>
- <var id="DIM_2">2</var>
- <var id="DIM_4">3</var>
- </div>
- </div>
-
- <!-- 3x2 solution dimensions -->
- <div id="3x1-1x2">
- <div class="vars" data-apply="prependVars">
- <var id="DIM_1">3</var>
- <var id="DIM_2">1</var>
- <var id="DIM_4">2</var>
- </div>
- </div>
- <div id="3x2-2x2">
- <div class="vars" data-apply="prependVars">
- <var id="DIM_1">3</var>
- <var id="DIM_2">2</var>
- <var id="DIM_4">2</var>
- </div>
- </div>
- </div>
-
- </div>
-</body>
-</html>
View
119 exercises/multiplying_a_matrix_by_a_matrix_video_hint.html
@@ -1,119 +0,0 @@
-<!DOCTYPE html>
-<html data-require="math matrix matrix-input">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Multiplying a matrix by a matrix</title>
- <script src="../khan-exercise.js"></script>
-</head>
-<body>
- <div class="exercise">
-
- <div class="vars" data-ensure="PRETTY_MAT_1_ID !== PRETTY_MAT_2_ID">
- <var id="DIM_3">DIM_2</var>
- <var id="MAT_1">makeMatrix(randRange(-2, 5, DIM_1, DIM_2))</var>
- <var id="MAT_2">makeMatrix(randRange(-2, 5, DIM_3, DIM_4))</var>
-
- <var id="SOLN_MAT">
- matrixMult(MAT_1, MAT_2)
- </var>
- <var id="PADDED_SOLN_MAT">matrixPad(SOLN_MAT, 3, 3)</var>
-
- <var id="PRETTY_MAT_1_ID">"\\textbf " + randFromArray("ABCDEF")</var>
- <var id="PRETTY_MAT_2_ID">"\\textbf " + randFromArray("ABCDEF")</var>
-
- <!-- For generating hint matrices-->
- <var id="ROW_COLORS">[GREEN, BLUE, GRAY]</var>
- <var id="COL_COLORS">[ORANGE, "#DF0030", "#9D38BD"]</var>
-
- <var id="FINAL_HINT_MAT">
- makeMultHintMatrix(MAT_1, MAT_2, ROW_COLORS, COL_COLORS)
- </var>
-
- </div>
-
- <div class="problem">
- <p>
- <code><var>PRETTY_MAT_1_ID</var> = <var>printSimpleMatrix(MAT_1)</var></code>
- </p>
- <p>
- <code><var>PRETTY_MAT_2_ID</var> = <var>printSimpleMatrix(MAT_2)</var></code>
- </p>
- </div>
-
- <p class="question">
- What is <code><var>PRETTY_MAT_1_ID + PRETTY_MAT_2_ID</var></code>?
- </p>
-
- <div class="hints">
- <div>
- <div data-video-hint data-youtube-id="u3Nvcq1D4rI"></div>
- </div>
- <div>
- <p>The solution is:</p>
- <div>
- <code>
- <var>printSimpleMatrix(SOLN_MAT)</var>
- </code>
- </div>
- </div>
- </div>
-
- <div class="solution" data-type="multiple">
- <div data-each="PADDED_SOLN_MAT as row" class="matrix-row">
- <span data-each="row as elem">
- <span data-if="elem !== ''" class="sol" data-forms="integer">
- <var>elem</var>
- </span>
- <span data-else data-type="text" class="sol">
- <var>elem</var>
- </span>
- </span>
- </div>
- </div>
-
- <div class="problems">
- <!-- 2x2 solution dimensions -->
- <div id="2x2-2x2">
- <div class="vars" data-apply="prependVars">
- <var id="DIM_1">2</var>
- <var id="DIM_2">2</var>
- <var id="DIM_4">2</var>
- </div>
- </div>
- <div id="2x3-3x2">
- <div class="vars" data-apply="prependVars">
- <var id="DIM_1">2</var>
- <var id="DIM_2">3</var>
- <var id="DIM_4">2</var>
- </div>
- </div>
-
- <!-- 2x3 solution dimensions -->
- <div id="2x2-2x3">
- <div class="vars" data-apply="prependVars">
- <var id="DIM_1">2</var>
- <var id="DIM_2">2</var>
- <var id="DIM_4">3</var>
- </div>
- </div>
-
- <!-- 3x2 solution dimensions -->
- <div id="3x1-1x2">
- <div class="vars" data-apply="prependVars">
- <var id="DIM_1">3</var>
- <var id="DIM_2">1</var>
- <var id="DIM_4">2</var>
- </div>
- </div>
- <div id="3x2-2x2">
- <div class="vars" data-apply="prependVars">
- <var id="DIM_1">3</var>
- <var id="DIM_2">2</var>
- <var id="DIM_4">2</var>
- </div>
- </div>
- </div>
-
- </div>
-</body>
-</html>
Please sign in to comment.
Something went wrong with that request. Please try again.