Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

43 lines (41 sloc) 1.816 kb
<!DOCTYPE html>
<html data-require="math graphie graphie-helpers-arithmetic">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Division 3</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars">
<var id="DIVISOR">randRange( 2, 9 )</var>
<var id="QUOTIENT">randRange( 10, 99 )</var>
<var id="FINAL_REMAINDER">randRange( 1, DIVISOR - 1 )</var>
<var id="DIVIDEND">DIVISOR * QUOTIENT + FINAL_REMAINDER</var>
<var id="DIVIDEND_DIGITS">integerToDigits( DIVIDEND )</var>
</div>
<div class="problems">
<div>
<p>If the answer is a quotient of 5 and a remainder of 3, it should be typed in the form "5 R 3".</p>
<div class="graphie" id="numbers">
graph.divider = new Divider( DIVISOR, DIVIDEND );
graph.divider.show();
DUMMY = Array( graph.divider.getNumHints() );
</div>
<div class="solution" data-type="multiple">
<span class="sol" data-type="regex">^<var>QUOTIENT</var>\s*[rR]\s*<var>FINAL_REMAINDER</var>$</span>
<p class="example">a quotient and remainder, like <code>5 \text{ R } 3</code></p>
</div>
</div>
</div>
<div class="hints">
<div class="graphie" data-update="numbers" data-each="DUMMY as dummy">
graph.divider.showHint();
</div>
<div class="graphie" data-update="numbers">
drawDigits( [ "\\text{R}" ].concat( integerToDigits( FINAL_REMAINDER ) ), DIVIDEND_DIGITS.length, 1 );
</div>
</div>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.