# Khan/khan-exercises

Whitespace cleanup!

1 parent e9dc109 commit 6371709b920b654d431c95117d82036343b4a3f4 spicyj committed Jun 21, 2011
 @@ -48,7 +48,7 @@
-

NOTATION.ddxF = ( derivative of OUTER.fText with respect to INNER.fText +

NOTATION.ddxF = ( derivative of OUTER.fText with respect to INNER.fText ) \cdot ( derivative of INNER.fText with respect to x)

The derivative of OUTER.fText with respect to INNER.fText = OUTER.ddxFText

 @@ -5,7 +5,7 @@ - @@ -15,7 +15,7 @@
randRange( 1, 14 ) randRange( NUM_1 + 1, 15 ) - + NUM_1 randRange( NUM_2 + 1, 15 ) @@ -31,7 +31,7 @@ DEN_1 > DEN_2 ? "less" : "more" SMALLER === "smaller" ? "bigger" : "smaller"
- +

Fill in the blank.

@@ -62,12 +62,12 @@

So, \dfrac{NUM_1}{DEN_1} SOLUTION \dfrac{NUM_2}{DEN_2}

- +
randRange( 1, 14 ) randRange( NUM_1 + 1, 15 ) - + DEN_1 randRange( 1, DEN_2 - 1 ) @@ -80,7 +80,7 @@ })() NUM_1 < NUM_2 ? "less" : "more"
- +

Fill in the blank.

@@ -104,7 +104,7 @@

piechart( [NUM_2, DEN_2 - NUM_2], ["#ee0000", "#999"], 50 );
-
+

plural( NUM_1, "slice" ) is LESS pizza than plural( NUM_2, "slice" ).

So, \dfrac{NUM_1}{DEN_1} SOLUTION \dfrac{NUM_2}{DEN_2}

@@ -113,4 +113,4 @@ - +
 @@ -16,7 +16,7 @@ randRange( 2, 3 ) randRange( 1, 14 ) randRange( 1, 14 ) - + randRange( NUM_1 + 1, 15 ) randRange( NUM_2 + 1, 15 ) @@ -26,7 +26,7 @@ var tmp = NUM_1; NUM_1 = NUM_2; NUM_2 = tmp; - + tmp = DEN_1; DEN_1 = DEN_2; DEN_2 = tmp; @@ -35,13 +35,13 @@ return "unused var"; })() - + getLCM( DEN_1, DEN_2 ) LCM / DEN_1 F1 === 1 ? "remains as" : "becomes" LCM / DEN_2 F2 === 1 ? "remains as" : "becomes" - + (function() { var f1 = NUM_1 / DEN_1; var f2 = NUM_2 / DEN_2; @@ -68,7 +68,7 @@
• =
• >
• - +

It is easier to compare these two fractions when they have the same denominator.

Their smallest common denominator is the LCM of DEN_1 and DEN_2.

@@ -80,12 +80,12 @@

We see that \dfrac{NUM_1 * F1}{LCM} SOLUTION \dfrac{NUM_2 * F2}{LCM}.

- +
randRange( 1, 4 ) NUM_1 * FACTOR - + randRange( NUM_1 + 1, 5 ) DEN_1 * FACTOR
@@ -94,4 +94,4 @@
- +
 @@ -53,4 +53,4 @@ - +
 @@ -25,7 +25,7 @@ 5 - + randRange(5, 15) @@ -74,17 +74,14 @@ NUM_UNFAIR_COINS / NUM_COINS 1 - CHANCE_UNFAIR_PICKED - round(10000 * (CHANCE_UNFAIR_PICKED * pow((PERCENT_CHANCE_UNFAIR_HEADS / 100), NUM_FLIPS) + + round(10000 * (CHANCE_UNFAIR_PICKED * pow((PERCENT_CHANCE_UNFAIR_HEADS / 100), NUM_FLIPS) + CHANCE_FAIR_PICKED * pow(.5,NUM_FLIPS))) / 100
-

You have NUM_COINS coins in a bag. NUM_UNFAIR_COINS of them are - unfair in that they have a PERCENT_CHANCE_UNFAIR_HEADS\% chance of coming up heads when - flipped (the rest are fair coins). You randomly choose one coin from the bag and flip it - NUM_FLIPS times.

+

You have NUM_COINS coins in a bag. NUM_UNFAIR_COINS of them are unfair in that they have a PERCENT_CHANCE_UNFAIR_HEADS\% chance of coming up heads when flipped (the rest are fair coins). You randomly choose one coin from the bag and flip it NUM_FLIPS times.

What is the percent probability of getting NUM_FLIPS heads?

@@ -115,11 +112,11 @@

Now, then, your chance of both picking the unfair coin and also flipping NUM_FLIPS heads--the chance that both these events occur--is what?

- +

- - + +

Now, the other possibility, picking the fair coin and flipping NUM_FLIPS heads is what?

@@ -130,12 +127,9 @@

 @@ -56,14 +56,14 @@ rectchart( [A, B - A], ["#ee0000", "#999"] ); - +

How many total slices would we need if want the same amount of pizza( 1 ) in C slices?

rectchart( [C, D - C], ["#ee0000", "#fff"] );
- +

We would need to cut the pizza( 1 ) into D slices.

 @@ -103,4 +103,4 @@ - +
 @@ -12,10 +12,10 @@ var exp_zero_prob = .2; var exp_unit_prob = .1; - + var base_negunit_prob = .2; var base_unit_prob = .05; - var base_zero_prob = .05; + var base_zero_prob = .05; var r = KhanUtil.random(); if ( r < exp_zero_prob + exp_unit_prob ) {
 @@ -11,7 +11,7 @@ var base_neg_prob = .5; var exp_neg_prob = .75; var base_rat_prob = .75; - + var base_neg = Math.random() < base_neg_prob; var base_n = KhanUtil.randRange( 1, 10 ); var base_d;
 @@ -20,7 +20,7 @@ isOdd( EXP_D ) && ( random() < .75 ) VALS.base_1 VALS.base_2 - + EXP_NEG ? BASE_D : BASE_N EXP_NEG ? BASE_N : BASE_D @@ -62,24 +62,24 @@
= \left(fracParens( BASEF_N, BASEF_D )^{fracSmall( 1, EXP_D )}\right)^{EXP_N}
- +
To simplify fracParens( BASEF_N, BASEF_D )^{fracSmall( 1, EXP_D )}, figure out what goes in the blank:
\left(?\right)^{abs( EXP_D )}=frac( BASEF_N, BASEF_D )
\color{blue}{frac( ROOT_N, ROOT_D )} - +
so \quadfracParens( BASEF_N, BASEF_D )^{fracSmall( 1, EXP_D )}=frac( ROOT_N, ROOT_D )
- +
So fracParens( BASEF_N, BASEF_D )^{fracSmall( EXP_N, EXP_D )}=\left(fracParens( BASEF_N, BASEF_D )^{fracSmall( 1, EXP_D )}\right)^{EXP_N}=fracParens( ROOT_N, ROOT_D )^{EXP_N}
= fraction( ROOT_N, ROOT_D, true, true, false, true )^{EXP_N}
- +
= expandFractionExponent( ROOT_N, ROOT_D, EXP_N )
- +
= frac( SOL_N, SOL_D )
@@ -89,11 +89,11 @@ - - - - - - + + + + + +
 @@ -23,21 +23,21 @@

They ate \dfrac{A + B}{TOTAL} of the pizza( 1 ).

- +

If there were plural(LEFT, "slice") remaining, what fraction of the pizza was eaten?

Together they ate A + B slices with plural( LEFT, "slice" ) remaining, which means they ate A + B out of TOTAL slices.

- +

If person( 1 ) ate \dfrac{A}{TOTAL} of the pizza( 1 ), what fraction of the pizza was eaten?

If plural( A, "slice") represents \dfrac{A}{TOTAL} of the pizza( 1 ), there must have been a total of TOTAL slices. person( 1 ) and person( 2 ) together ate A + B out of TOTAL slices.

- +

person( 1 ) ate plural( A, "slice" ) of pizza( 1 ), and person( 2 ) ate plural( B, "slice" ).

If there were initially TOTAL slices, what fraction of the pizza( 1 ) is remaining?

@@ -47,7 +47,7 @@

There is \dfrac{LEFT}{TOTAL} of the pizza( 1 ) remaining.

- +

If person( 1 ) ate \dfrac{A}{TOTAL} of the pizza( 1 ), what fraction of the pizza is remaining?

@@ -57,4 +57,4 @@
- +
 @@ -9,15 +9,15 @@
["f", "g", "h"] ["x", "n", "t"] - + new Polynomial( randRange(0, 2), randRangeWeighted(1, 3, 3, 0.2), null, randFromArray(FUNC_VARIABLES), randFromArray(FUNC_NAMES) ) - + new CompositePolynomial( randRange(0, 2), randRangeWeighted(1, 3, 3, 0.2), null, randFromArray(FUNC_VARIABLES), randFromArray(FUNC_NAMES), INNER )
-
+
shuffle([INNER, OUTER]) shuffle([INNER, OUTER]) @@ -44,7 +44,7 @@
new CompositePolynomial( randRange(0, 2), randRange(1, 3), null, randFromArray(FUNC_VARIABLES), randFromArray(FUNC_NAMES), randFromArray([INNER, OUTER]) ) - + shuffle([INNER, OUTER, OUTER2]) shuffle([INNER, OUTER, OUTER2]) @@ -74,7 +74,7 @@

First, let's solve for the value of the inner function, SOLVE_FOR[1].name(VALUE). Then we'll know what to plug into the outer function.

SOLVE_FOR[1].hint(VALUE)

- +

Now we know that SOLVE_FOR[1].name(VALUE) = INNER_VALUE. Let's solve for SOLVE_FOR[0].name(SOLVE_FOR[1].name(VALUE)), which is SOLVE_FOR[0].name(INNER_VALUE).

 @@ -28,7 +28,7 @@

Solve for UNKNOWN. Round to the nearest tenth.

Make sure you select the proper units. You may do arithmetic with a calculator.

- +
MOTION[UNKNOWN]