Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (46 sloc) 2.07 KB
<!DOCTYPE html>
<html data-require="math graphie graphie-helpers-arithmetic word-problems">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Subtract within 20</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
<div class="exercise">
<div class="vars">
<var id="A">randRange(2, 20)</var>
<var id="B">randRange(1, A - 1)</var>
<div class="problems">
<div class="question">
<div class="graphie">
range: [[0, 12], [-1, 1]]
var equation = rand(2) === 0 ?
"\\Huge{\\blue{" + A + "} - \\red{" + B + "} = {?}}" :
"\\Huge{{?} = \\blue{" + A + "} - \\red{" + B + "}}"
label([0, 0], equation, "right");
<div class="solution" data-forms="integer"><var>A - B</var></div>
<div class="hints">
<div class="graphie" id="circles" style="float: left;">
drawCircles(A, BLUE);
<div class="graphie" data-update="circles">
crossOutCircles(A, B, RED);
<p style="clear: left;">
<span data-if="isSingular(A)">We began with <code>\blue{<var>A</var>}</code> dot and crossed out <code>\red{<var>B</var>}</code> of them.</span>
<span data-else="">We began with <code>\blue{<var>A</var>}</code> dots and crossed out <code>\red{<var>B</var>}</code> of them.</span>
<p data-if="isSingular(A - B)">We are left with <var>A - B</var> dot.</p>
<p data-else="">We are left with <var>A - B</var> dots.</p>
Something went wrong with that request. Please try again.