Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 47 lines (42 sloc) 2.223 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 40 41 42 43 44 45 46
<!DOCTYPE html>
<html data-require="math math-format">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Converting 1-digit repeating decimals to fractions</title>
    <script data-main="../local-only/main.js" src="../local-only/require.js"></script>
</head>
<body>
    <div class="exercise">
    <div class="vars">
        <var id="N1">randRange( 0, 3 )</var>
        <var id="N2">randRange( 1, 8 )</var>
        <var id="N4">N1 + N2 / 9</var>

        <var id="D1">0</var>
        <var id="D2">1</var>

        <var id="MULT1">round( pow( 10, D2 ) )</var>
        <var id="MULT2">round( pow( 10, D1 ) )</var>
        <var id="RES1">floorTo( 4,( MULT1 * N4 ) )</var>
        <var id="RES2">floorTo( 4,( MULT2 * N4 ) )</var>
        <var id="DIFF">round( RES1 - RES2 )</var>
    </div>

    <div class="problems">
        <div>
            <p class="question">Rewrite as a simplified fraction.</p>
            <p><code>\large{<var>N1</var>.\overline{<var>N2</var>} = {?}}</code></p>
            <p class="solution" data-type="rational"><var>N4</var></p>
        </div>
    </div>

    <div class="hints">
        <p>Let <code>x</code> equal the decimal. Set up two equations such that the digits after the decimal point are identical.</p>
        <p><code>\large{\begin{align*}<var>MULT1</var>x &amp;= <var>RES1</var>...\\
        <var>MULT2</var>x &amp;= <var>RES2</var>...\end{align*}}</code></p>
        <div>
            <p>Subtracting the two equations, we have:</p>
            <p><code>\large{<var>(MULT1 - MULT2)</var>x = <var>DIFF</var>}</code></p>
        </div>
        <p><code>\large{x = <var>fraction( DIFF, MULT1 - MULT2 )</var>}\quad<span data-if="getGCD( DIFF, MULT1 - MULT2 ) === 1 && DIFF > ( MULT1 - MULT2 )"> \text{or} \quad\large{<var>mixedFractionFromImproper( DIFF, MULT1 - MULT2 )</var>}</span></code></p>
        <p data-if="getGCD( DIFF, MULT1 - MULT2 ) !== 1"><code>\large{x = <var>fraction( toFraction( N4 )[ 0 ], toFraction( N4 )[ 1 ])</var>}\quad<span data-if="DIFF > ( MULT1 - MULT2 )"> \text{or} \quad\large{<var>mixedFractionFromImproper( toFraction( N4 )[ 0 ], toFraction( N4 )[ 1 ] )</var>}</span></code></p>
    </div>
    </div>
</body>
</html>
Something went wrong with that request. Please try again.