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

46 lines (44 sloc) 1.272 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 1.5</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
<div class="vars">
<var id="DIVISOR">randRange( 2, 9 )</var>
<var id="NUM_DIGITS">randRange( 2, 3 )</var>
<var id="MAX_QUOTIENT_DIGIT">floor( 9 / DIVISOR )</var>
<var id="QUOTIENT">
(function() {
var quotient = randRange( 1, MAX_QUOTIENT_DIGIT );
for ( var i = 1; i &lt; NUM_DIGITS; i++ ){
quotient *= 10;
quotient += randRange( 0, MAX_QUOTIENT_DIGIT );
}
return quotient;
})()
</var>
<var id="DIVIDEND">DIVISOR * QUOTIENT</var>
<var id="DUMMY">[]</var>
</div>
<div class="problems">
<div>
<div class="graphie" id="numbers">
graph.divider = new Divider( DIVISOR, DIVIDEND );
graph.divider.show();
DUMMY = Array( graph.divider.getNumHints() );
</div>
<div class="solution" data-forms="integer"><var>QUOTIENT</var></div>
</div>
</div>
<div class="hints">
<div class="graphie" data-update="numbers" data-each="DUMMY as dummy">
graph.divider.showHint();
</div>
</div>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.