Permalink
Browse files

Align subtracting decimals exercises to common core

  • Loading branch information...
1 parent 229bd98 commit ae1572a97805ada17c0dfa264b1dc8c7928d9dee @beneater beneater committed Jul 2, 2013
@@ -11,8 +11,8 @@
<var id="A">randRange( 101, 999 )</var>
<var id="B">randRange( 101, 999 )</var>
- <var id="A_DECIMAL">randRange( 1, 3 )</var>
- <var id="B_DECIMAL" data-ensure="B_DECIMAL !== A_DECIMAL">randRange( 1, 3 )</var>
+ <var id="A_DECIMAL">2</var>
+ <var id="B_DECIMAL">2</var>
<var id="A_FLOAT">A / pow( 10, A_DECIMAL )</var>
<var id="B_FLOAT">B / pow( 10, B_DECIMAL )</var>
@@ -11,8 +11,8 @@
<var id="A">randRange( 101, 999 )</var>
<var id="B">randRange( 101, 999 )</var>
- <var id="A_DECIMAL">randRange( 1, 2 )</var>
- <var id="B_DECIMAL">A_DECIMAL</var>
+ <var id="A_DECIMAL">1</var>
+ <var id="B_DECIMAL">1</var>
<var id="A_FLOAT">A / pow( 10, A_DECIMAL )</var>
<var id="B_FLOAT">B / pow( 10, B_DECIMAL )</var>
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html data-require="math math-format graphie graphie-helpers-arithmetic">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Subtracting decimals</title>
+ <script src="../khan-exercise.js"></script>
+</head>
+<body>
+ <div class="exercise">
+ <div class="vars" data-ensure="A_FLOAT &gt; B_FLOAT">
+ <var id="A">randRange( 101, 999 )</var>
+ <var id="B">randRange( 101, 999 )</var>
+
+ <var id="A_DECIMAL">randRange( 1, 3 )</var>
+ <var id="B_DECIMAL" data-ensure="B_DECIMAL !== A_DECIMAL">randRange( 1, 3 )</var>
+
+ <var id="A_FLOAT">A / pow( 10, A_DECIMAL )</var>
+ <var id="B_FLOAT">B / pow( 10, B_DECIMAL )</var>
+ </div>
+
+ <div class="problems">
+ <div>
+ <p><code>\Huge{<var>localeToFixed(A_FLOAT, A_DECIMAL)</var> - <var>localeToFixed(B_FLOAT, B_DECIMAL)</var> = {?}}</code></p>
+ <div class="solution" data-type="decimal"><var>A_FLOAT - B_FLOAT</var></div>
+ </div>
+ </div>
+ <div class="hints">
+ <div class="graphie" id="numbers">
+ graph.adder = new DecimalSubtractor( A, A_DECIMAL, B, B_DECIMAL );
+ graph.adder.show();
+ graph.adder.showDecimals();
+ </div>
+ <div class="graphie" data-each="DecimalSubtractor.numHintsFor( A, A_DECIMAL, B, B_DECIMAL ) times" data-update="numbers">
+ graph.adder.showHint();
+ </div>
+ </div>
+ </div>
+</body>
+</html>

0 comments on commit ae1572a

Please sign in to comment.