Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (39 sloc) 1.91 KB
<!DOCTYPE html>
<html data-require="math graphie graphie-helpers-arithmetic">
<title>Converting fractions to decimals</title>
<script src="../khan-exercise.js"></script>
<div class="exercise">
<div class="problems">
<div class="vars" data-ensure="getGCD( NUMERATOR, DENOMINATOR ) === 1">
<var id="NUMERATOR">randRange( 1, 30 )</var>
<var id="DENOMINATOR">randRange( NUMERATOR + 1, 30 )</var>
<var id="DECIMAL_4">Math.floor( NUMERATOR / DENOMINATOR * 10000 ) / 10000</var>
<var id="DECIMAL">roundTo( 3, NUMERATOR / DENOMINATOR )</var>
<p>Express the fraction as a decimal, rounded to the thousandth.</p>
<p class="question"><code>\dfrac{<var>NUMERATOR</var>}{<var>DENOMINATOR</var>}</code></p>
<p class="solution" data-type="decimal"><var>DECIMAL</var></p>
<div class="hints">
<p>This fraction represents the result of dividing <code><var>NUMERATOR</var></code> by <code><var>DENOMINATOR</var></code>.</p>
<div class="graphie" id="nmbrs">
graph.divider = new Divider( DENOMINATOR, NUMERATOR * 10000, 0, 4 );;
DUMMY = Array( graph.divider.getNumHints() );
<div class="graphie" data-update="nmbrs">
<div class="graphie" data-update="nmbrs" data-each="Divider.numHintsFor( DENOMINATOR, NUMERATOR * 10000, 0, 4 ) times">
<p>Rounding <code><var>DECIMAL_4.toFixed( 4 )</var></code> to the thousandths place gives <code><var>DECIMAL.toFixed( 3 )</var></code>.</p>
Jump to Line
Something went wrong with that request. Please try again.