Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (47 sloc) 2.05 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>Add within 5</title>
<script data-main="../local-only/main" src="../local-only/require.js"></script>
<div class="exercise">
<div class="vars">
<var id="A">randRange(1, 4)</var>
<var id="B">randRange(1, 5 - A)</var>
<div class="problems">
<div class="question">
<div class="graphie">
range: [[0, 12], [-1, 1]]
var equation = rand(2) === 0 ?
"\\Huge{\\blue{" + A + "} + \\green{" + B + "} = {?}}" :
"\\Huge{{?} = \\blue{" + A + "} + \\green{" + B + "}}"
label([0, 0], equation, "right");
<div class="solution" data-forms="integer"><var>A + B</var></div>
<div class="hints">
<div class="graphie" style="float: left;">
drawCircles(A, BLUE);
<div class="graphie" style="float: left;">
drawCircles(B, GREEN);
<p style="clear: left;">
<span data-if="isSingular(A)">There is <code>\blue{<var>A</var>}</code> blue dot.</span>
<span data-else="">There are <code>\blue{<var>A</var>}</code> blue dots.</span>
<span data-if="isSingular(B)">There is <code>\green{<var>B</var>}</code> green dot.</span>
<span data-else="">There are <code>\green{<var>B</var>}</code> green dots.</span>
<p>There are a total of <var>A + B</var> dots.</p>
Jump to Line
Something went wrong with that request. Please try again.