This repository has been archived by the owner on May 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 863
/
division_3.html
42 lines (41 loc) · 1.77 KB
/
division_3.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!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>