This repository has been archived by the owner on May 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 863
/
changing_percents_to_fractions.html
44 lines (40 loc) · 2.26 KB
/
changing_percents_to_fractions.html
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
39
40
41
42
43
44
<!DOCTYPE html>
<html data-require="math math-format">
<head>
<title>Changing percents to fractions</title>
<script src="../khan-exercise.js"></script>
</head>
<body>
<div class="exercise">
<div class="problems">
<div id="lt-100">
<div class="vars">
<var id="A">randRangeExclude( 1 , 299 , [ 100 ] )</var>
</div>
<p class="question">Express <code><var>A</var>\%</code> as a fraction. Reduce to lowest terms.</p>
<p class="solution" data-type="rational"><var>A / 100</var></p>
<div class="hints">
<p><code><var>A</var>\%</code> literally means <code><var>A</var></code> per 100</p>
<p>Putting this in fraction form: <code><var>fraction( A , 100 )</var></code></p>
<p data-if="getGCD( A , 100 ) > 1">Both numerator and denominator are divisible by <code><var>getGCD( A , 100 )</var></code>.</p>
<p data-if="getGCD( A , 100 ) > 1">Reducing to lowest terms, <code><var>fractionReduce( A , 100 )</var></code>.</p>
<p data-if="A > 100">Optionally, the improper fraction <code><var>fractionReduce( A , 100 )</var></code> can be converted to the mixed number <code><var>( A - A % 100 ) / 100 + fractionReduce( round ( A % 100 ), 100 )</var></code>.</p>
</div>
</div>
<div id="decimal" data-type="lt-100">
<div class="vars">
<var id="A">randRange( 101, 1999 ) / 10</var>
</div>
<div class="hints">
<p><code><var>A</var>\%</code> literally means <code><var>A</var></code> per 100</p>
<p>Putting this in fraction form: <code><var>fraction( A , 100 )</var></code></p>
<p data-if="( A * 10 ) % 10 !== 0">Multiplying top and bottom by 10 to get rid of the decimal: <code><var>fraction( A * 10 , 1000 )</var></code></p>
<p data-if="getGCD( A * 10 , 1000 ) > 1">Both numerator and denominator are divisible by <code><var>getGCD( A * 10 , 1000 )</var></code>.</p>
<p data-if="getGCD( A * 10 , 1000 ) > 1">Reducing to lowest terms, <code><var>fractionReduce( A * 10 , 1000 )</var></code>.</p>
<p data-if="A > 100">Optionally, the improper fraction <code><var>fractionReduce( A * 10 , 1000 )</var></code> can be converted to the mixed number <code><var>( A * 10 - A * 10 % 1000 ) / 1000 + fractionReduce( round ( A * 10 % 1000 ), 1000 )</var></code>.</p>
</div>
</div>
</div>
</div>
</body>
</html>