Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

47 lines (42 sloc) 2.17 kb
<!DOCTYPE html>
<html data-require="math math-format">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Converting repeating decimals to fractions 1</title>
<script src="../khan-exercise.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 &= <var>RES1</var>...\\
<var>MULT2</var>x &= <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>
Jump to Line
Something went wrong with that request. Please try again.