Add exercise: One Step Equations 0.5 #7532
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
<!DOCTYPE html> | ||
<html data-require="math math-format expressions"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>One-step equations 0.5</title> | ||
<script src="../khan-exercise.js"></script> | ||
</head> | ||
<body> | ||
<div class="exercise"> | ||
<div class="vars"> | ||
<var id="LETTERS">"abkmnpvxy"</var> | ||
<var id="X">LETTERS.charAt( randRange( 0, LETTERS.length - 1 ) )</var> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we need a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or |
||
</div> | ||
<div class="problems"> | ||
<div id="add-subtract" data-weight="4"> | ||
<div class="vars" data-ensure="Y !== Z"> | ||
<var id="INDEX">randRange( 0, 1 )</var> | ||
<var id="Y">randRangeNonZero( -20, 19 )</var> | ||
<var id="Z" data-ensure="Z > Y">randRange( 1, 20 )</var> | ||
<var id="Y_SIGN">Y > 0 ? "-" : "+"</var> | ||
<var id="LEFT">[expr( ["+", X, Y] ), Z][INDEX]</var> | ||
<var id="RIGHT">[Z, expr( ["+", X, Y] )][INDEX]</var> | ||
</div> | ||
<p class="question">Solve for <var>X</var>.</p> | ||
<p><code>\large{<var>LEFT</var> = <var>RIGHT</var>}</code></p> | ||
<div class="solution" data-forms="integer"><var>Z - Y</var></div> | ||
<div class="hints"> | ||
<div> | ||
<p><var>Y > 0 ? "Subtract" : "Add"</var> <var>abs(Y)</var> <var>Y > 0 ? "from" : "to"</var> both sides.</p> | ||
<p data-if="INDEX === 0"><code>\large{<var>X</var>\color{blue}{<var>Y_SIGN</var><var>abs( Y )</var>} = <var>RIGHT</var>\color{blue}{<var>Y_SIGN</var><var>abs( Y )</var>}}</code></p> | ||
<p data-else><code>\large{<var>LEFT</var>\color{blue}{<var>Y_SIGN</var><var>abs( Y )</var>} = <var>X</var>\color{blue}{<var>Y_SIGN</var><var>abs( Y )</var>}}</code></p> | ||
</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if it makes sense to split this into two hints. It could be that people know how to add/subtract to/from both sides but don't know that they should? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Like it - added. |
||
<div> | ||
<p>Simplify.</p> | ||
<div data-if="INDEX === 0"> | ||
<p><code>\large{<var>X</var> = <var>Z - Y</var>}</code></p> | ||
</div> | ||
<div data-else> | ||
<p><code>\large{<var>Z - Y</var> = <var>X</var>}</code></p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div id="multiply" data-weight="2"> | ||
<div class="vars"> | ||
<var id="INDEX">randRange( 0, 1 )</var> | ||
<var id="Y">randRange( 2, 10 )</var> | ||
<var id="Z">randRange( 1, 9) * Y</var> | ||
<var id="LEFT">[expr( ["*", Y, X] ), Z][INDEX]</var> | ||
<var id="RIGHT">[Z, expr( ["*", Y, X] )][INDEX]</var> | ||
</div> | ||
<p class="question">Solve for <var>X</var>.</p> | ||
<p><code>\large{<var>LEFT</var> = <var>RIGHT</var>}</code></p> | ||
<div class="solution" data-type="rational"><var>Z / Y</var></div> | ||
<div class="hints"> | ||
<div data-if="INDEX === 0"> | ||
<p>Divide both sides by <var>Y</var>.</p> | ||
<p><code>\large{\dfrac{<var>X</var>}{\color{blue}{<var>Y</var>}} = \dfrac{<var>Z</var>}{\color{blue}{<var>Y</var>}}}</code></p> | ||
</div> | ||
<div data-else> | ||
<p>Divide both sides by <var>Y</var>.</p> | ||
<p><code>\large{\dfrac{<var>Z</var>}{\color{blue}{<var>Y</var>}} = \dfrac{<var>X</var>}{\color{blue}{<var>Y</var>}}}</code></p> | ||
</div> | ||
<div> | ||
<p>Simplify.</p> | ||
<div data-if="INDEX === 0"> | ||
<p><code>\large{<var>X</var> = <var>Z / Y</var>}</code></p> | ||
</div> | ||
<div data-else> | ||
<p><code>\large{<var>Z / Y</var> = <var>X</var>}</code></p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div id="divide" data-weight="1"> | ||
<div class="vars"> | ||
<var id="INDEX">randRange( 0, 1 )</var> | ||
<var id="Y">randRange( 2, 10 )</var> | ||
<var id="Z">randRange( 2, 10)</var> | ||
</div> | ||
<p class="problem"><b>Solve for <var>X</var>.</b></p> | ||
<p class="question"><code>\large{\dfrac{<var>X</var>}{<var>Y</var>} = <var>Z</var>}</code></p> | ||
<div class="solution" data-type="rational"><var>Z * Y</var></div> | ||
<div class="hints"> | ||
<div> | ||
<p>Multiply both sides by <var>Y</var>.</p> | ||
<p><code>\large{\dfrac{<var>X</var>}{<var>Y</var>} \cdot {\color{blue}{<var>Y</var>}} = <var>Z</var> \cdot {\color{blue}{<var>Y</var>}}}</code></p> | ||
</div> | ||
<div> | ||
<p>Simplify.</p> | ||
<p><code>\large{<var>X</var> = <var>Z * Y</var>}</code></p> | ||
</div> | ||
</div> | ||
</div> | ||
<div id="divide-right" data-type="divide" data-weight="1"> | ||
<p class="question"><code>\large{<var>Z</var> = \dfrac{<var>X</var>}{<var>Y</var>}}</code></p> | ||
<div class="hints"> | ||
<div> | ||
<p>Multiply both sides by <var>Y</var>.</p> | ||
<p><code>\large{<var>Z</var> \cdot {\color{blue}{<var>Y</var>}} = \dfrac{<var>X</var>}{<var>Y</var>} \cdot {\color{blue}{<var>Y</var>}}}</code></p> | ||
</div> | ||
<div> | ||
<p>Simplify.</p> | ||
<p><code>\large{<var>Z * Y</var> = <var>X</var>}</code></p> | ||
</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe an extra X = ZY hint at the end? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Like it - added. |
||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you leave off the type completely (
<p class="solution">
), it will accept decimals like 37.0 as well.