Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 39 lines (36 sloc) 1.539 kb
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
<!DOCTYPE html>
<html data-require="math 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 > 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>A_FLOAT.toFixed( A_DECIMAL )</var> - <var>B_FLOAT.toFixed( 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-update="numbers" data-each="DecimalSubtractor.numHintsFor( A, A_DECIMAL, B, B_DECIMAL ) times">
                graph.adder.showHint();
            </div>
        </div>
    </div>
</body>
</html>
Something went wrong with that request. Please try again.