Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (46 sloc) 2.37 KB
<!DOCTYPE html>
<html data-require="math math-format word-problems">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Expressing ratios as fractions</title>
<script data-main="../local-only/main.js" src="../local-only/require.js"></script>
<div class="exercise">
<div class="vars">
<var id="FACTOR">randRange( 1, 5 )</var>
<var id="NUM">randRange( 1, 10 ) * FACTOR</var>
<var id="DENOM">randRange( 1, 10 ) * FACTOR</var>
<var id="GCD">getGCD( NUM, DENOM )</var>
<var id="TO">i18n._("to")</var>
<div class="problems">
<p class="question">
<!--TODO(jeresig): I18N: Find a better way to rewrite this.-->
<span data-if="isSingular(NUM)"><var>person(1)</var> has <var>NUM</var> <var>fruit( 0 )</var></span><span data-else=""><var>person(1)</var> has <var>NUM</var> <var>plural_form(fruit( 0 ), NUM)</var></span> <span data-if="isSingular(DENOM)">for every <var>DENOM</var> <var>fruit( 1 )</var>.</span><span data-else="">for every <var>DENOM</var> <var>plural_form(fruit( 1 ), DENOM)</var>.</span>
<span>Write the ratio of <var>fruit( 0 )</var>s to <var>fruit( 1 )</var>s as a simplified fraction.</span>
<p class="solution" data-ratio="true" data-type="improper"><var>NUM / DENOM</var></p>
<div class="hints">
<p>Ratios can be written in a few different ways that mean the same thing.</p>
<p>You can express a ratio with a colon separating the two numbers.</p>
<p>You can write it out as a phrase like this.</p>
<!-- I18N: Used in the "10 apples to 5 oranges" sense -->
<p><code><var>NUM</var> \text{ <var>TO</var> } <var>DENOM</var></code></p>
<p>Or, you can express a ratio as a fraction.</p>
<p><code>\dfrac{<var>NUM</var>}{<var>DENOM</var>}<span data-if="GCD !== 1">=<var>fractionReduce( NUM, DENOM )</var></span></code></p>
<p>Therefore, <code><var>fractionReduce( NUM, DENOM )</var></code> is the ratio of <var>fruit( 0 )</var>s to <var>fruit( 1 )</var>s written as a simplified fraction.</p>
Jump to Line
Something went wrong with that request. Please try again.