# Khan/khan-exercises

### Subversion checkout URL

You can clone with HTTPS or Subversion.

Older
100644 48 lines (45 sloc) 1.959 kb
 9e59905 Add exercise -- multiplying decimals marcia authored Jul 13, 2011 1 2 3 4 Adding and Subtracting Fractions 5 6 7 8
9
10 randRangeNonZero( -9, 9 ) 11 randRangeNonZero( -9, 9 ) 12 randRangeExclude( 2, 9, [ N1, -N1 ] ) 13 randRangeExclude( 2, 9, [ N2, -N2 ] ) 14 getLCM( D1, D2 ) 15 LCM / D1 16 LCM / D2 17
18 19
20
21

fraction( N1, D1 ) + fraction( N2, D2 ) = ?

22
N1 / D1 + N2 / D2
23
24
25 26
27

First, we need to find a common denominator. The least common multiple of D1 and D2 is the smallest possible common denominator.

28

LCM( D1, D2 ) = LCM

29

Now, we need to change both fractions to have a denominator of LCM.

30

\begin{align*}fraction( N1, D1 )\cdot fraction( F1, F1 ) &= fraction( N1 * F1, LCM )\end{align*}

31

\begin{align*}fraction( N2, D2 )\cdot fraction( F2, F2 ) &= fraction( N2 * F2, LCM )\end{align*}

32
33

So, the problem becomes:

34

fraction( N1 * F1, LCM ) + fraction( N2 * F2, LCM ) = ?

35
36
37

38

fraction( F1 * N1 + F2 * N2, LCM)

39
40
41

Simplify.

42

fractionReduce( F1 * N1 + F2 * N2, LCM )

43
44
45
46 47
Something went wrong with that request. Please try again.