Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 40 lines (36 sloc) 1.539 kb
0196b21 @Cyrik added subtraction_decimals
Cyrik authored
1 <!DOCTYPE html>
2ace114 @marcia Small arithmetic housecleaning
marcia authored
2 <html data-require="math graphie graphie-helpers-arithmetic">
0196b21 @Cyrik added subtraction_decimals
Cyrik authored
3 <head>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Subtracting decimals</title>
6 <script src="../khan-exercise.js"></script>
0196b21 @Cyrik added subtraction_decimals
Cyrik authored
7 </head>
8 <body>
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
9 <div class="exercise">
10 <div class="vars" data-ensure="A_FLOAT > B_FLOAT">
11 <var id="A">randRange( 101, 999 )</var>
12 <var id="B">randRange( 101, 999 )</var>
ad6f4a7 @spicyj Also factor out subtracting_decimals
spicyj authored
13
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
14 <var id="A_DECIMAL">randRange( 1, 3 )</var>
15 <var id="B_DECIMAL" data-ensure="B_DECIMAL !== A_DECIMAL">randRange( 1, 3 )</var>
ad6f4a7 @spicyj Also factor out subtracting_decimals
spicyj authored
16
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
17 <var id="A_FLOAT">A / pow( 10, A_DECIMAL )</var>
18 <var id="B_FLOAT">B / pow( 10, B_DECIMAL )</var>
19 </div>
0196b21 @Cyrik added subtraction_decimals
Cyrik authored
20
4e4cb9b @beneater lint: tabs->spaces and jQuery->$ for exercises
beneater authored
21 <div class="problems">
22 <div>
23 <p><code>\Huge{<var>A_FLOAT.toFixed( A_DECIMAL )</var> - <var>B_FLOAT.toFixed( B_DECIMAL )</var> = {?}}</code></p>
24 <div class="solution" data-type="decimal"><var>A_FLOAT - B_FLOAT</var></div>
25 </div>
26 </div>
27 <div class="hints">
28 <div class="graphie" id="numbers">
29 graph.adder = new DecimalSubtractor( A, A_DECIMAL, B, B_DECIMAL );
30 graph.adder.show();
31 graph.adder.showDecimals();
32 </div>
33 <div class="graphie" data-update="numbers" data-each="DecimalSubtractor.numHintsFor( A, A_DECIMAL, B, B_DECIMAL ) times">
34 graph.adder.showHint();
35 </div>
36 </div>
37 </div>
0196b21 @Cyrik added subtraction_decimals
Cyrik authored
38 </body>
39 </html>
Something went wrong with that request. Please try again.