Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

46 lines (39 sloc) 1.753 kB
<!DOCTYPE html>
<html data-require="math math-format graphie graphie-helpers">
<title>Changing fractions to decimals 1</title>
<script src="../khan-exercise.js"></script>
<script type="text/javascript">
function decimalLength( n ) {
return ( ( n + "" ).split( "." )[1] || "" ).length;
<div class="exercise">
<div class="vars">
<div data-ensure="decimalLength( DEC ) <= 4">
<var id="_D">randFromArray([ 4, 5, 8, 10, 16, 20, 25, 40, 50, 100 ])</var>
<var id="_N">randRange( 1, _D - 1 )</var>
<var id="DEC">_N / _D</var>
<var id="GCD">getGCD( _N, _D )</var>
<var id="N">round( _N / GCD )</var>
<var id="D">round( _D / GCD )</var>
<div class="problems">
<p class="question">Express <code><var>fraction( _N, _D )</var></code> as a decimal.</p>
<div class="solution" data-type="decimal"><var>DEC</var></div>
<div class="hints">
<p data-if="GCD > 1"><code><var>fraction( _N, _D )</var></code> reduces to <code><var>fraction( N, D )</var></code>.</p>
<p data-if="D === 10 || D === 100">Denominators of 10 or 100 are easy cases: The decimal form is just the numerator with the decimal place moved left by the number of 0s in the denominator.
<p data-if="D === 10 || D === 100">For this question, this means <var>D === 10 ? "1 place" : "2 places"</var>.</p>
<p data-else>To turn <code><var>fractionSmall( N, D )</var></code> into a decimal, perform long division, dividing <code><var>D</var></code> into <code><var>N</var></code> (if you need help with this, try practicing some Division exercises or watching some related videos).</p>
<p><code><var>N</var> \div <var>D</var> = <var>DEC</var></code></p>
Jump to Line
Something went wrong with that request. Please try again.