Skip to content

# public Khan /khan-exercises

### Subversion checkout URL

You can clone with HTTPS or Subversion.

Fetching contributors…

Cannot retrieve contributors at this time

file 43 lines (40 sloc) 1.852 kb
 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         Expressing ratios as fractions

randRange( 1, 5 )        randRange( 1, 10 ) * FACTOR        randRange( 1, 10 ) * FACTOR        getGCD( NUM, DENOM )

person(1) has plural( NUM, fruit( 0 ) ) for every plural( DENOM, fruit( 1 ) ). Write the ratio of fruit( 0 )s to fruit( 1 )s as a simplified fraction.

NUM / DENOM

Ratios can be written in a few different ways that mean the same thing.

You can express a ratio with a colon separating the two numbers.

NUM:DENOM

You can write it out as a phrase like this.

NUM \text{ to } DENOM

Or, you can express a ratio as a fraction.

\dfrac{NUM}{DENOM}=fractionReduce( NUM, DENOM )

Therefore, fractionReduce( NUM, DENOM ) is the ratio of fruit( 0 )s to fruit( 1 )s written as a simplified fraction.

Something went wrong with that request. Please try again.