Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 38 lines (35 sloc) 1.628 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
<!DOCTYPE html>
<html data-require="math math-format">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Multiplying fractions</title>
    <script src="../khan-exercise.js"></script>
</head>
<body>
    <div class="exercise">
    <div class="vars" data-ensure="getGCD(A, B) === 1 && getGCD(C, D) === 1">
        <var id="NEG1">randFromArray([1,-1])</var>
        <var id="NEG1S">NEG1 === -1 ? "-" : ""</var>
        <var id="A">randRange(1, 8)</var>
        <var id="B" data-ensure="B>A">randRange(2, 9)</var>

        <var id="NEG2">randFromArray([1, -1])</var>
        <var id="NEG2S">NEG2 === -1 ? "-" : ""</var>
        <var id="C">randRange(1, 8)</var>
        <var id="D" data-ensure="D>C">randRange(2, 9)</var>
    </div>

    <div class="problems">
        <div>
            <div class="question">
                <p><code>\displaystyle <var>NEG1S</var> \frac{<var>A</var>}{<var>B</var>} \times <var>NEG2S</var> \frac{<var>C</var>}{<var>D</var>}</code></p>
            </div>
            <div class="solution" data-type="rational"><var>(NEG1 * A * NEG2 * C) / (B * D)</var></div>
        </div>
    </div>

    <div class="hints">
        <p><code>\displaystyle {} = \frac{<var>NEG1 * A</var> \times <var>NEG2 * C</var>}{<var>B</var> \times <var>D</var>}</code></p>
        <p><code>\displaystyle {} = \frac{<var>NEG1 * A * NEG2 * C</var>}{<var>B * D</var>}</code></p>
        <p data-if="getGCD(NEG1 * A * NEG2 * C, B * D) !== 1 || NEG1 * NEG2 === -1"><code>\displaystyle {} = <var>fractionReduce(NEG1 * A * NEG2 * C, B * D)</var></code></p>
    </div>
    </div>
</body>
</html>
Something went wrong with that request. Please try again.