# Khan/khan-exercises

Fetching contributors…
Cannot retrieve contributors at this time
189 lines (183 sloc) 9.36 KB
 Comparing absolute values
randFromArray([[1, 1], [1, 0], [0, 1]]) randRange(-10, 10) (NUM_1 < 0) ? randRange(0, 10) : randRange(-10, -1) ABS_1 ? "\\lvert" + NUM_1 + "\\rvert" : NUM_1 ABS_2 ? "\\lvert" + NUM_2 + "\\rvert" : NUM_2 ABS_1 ? abs(NUM_1) : NUM_1 ABS_2 ? abs(NUM_2) : NUM_2 (function() { if ( NUM_1_VALUE === NUM_2_VALUE ) { return "="; } return NUM_1_VALUE < NUM_2_VALUE ? "<" : ">"; })()

Fill in the blank.

NUM_1_ABS ____ NUM_2_ABS

SOLUTION

• <
• >
• =
randFromArray([[1, 1], [1, 0], [0, 1]]) randRange(-99, 99) / 10 (NUM_1 < 0) ? randRange(0, 99) / 10 : randRange(-99, -1) / 10 ABS_1 ? "\\lvert" + NUM_1 + "\\rvert" : NUM_1 ABS_2 ? "\\lvert" + NUM_2 + "\\rvert" : NUM_2 ABS_1 ? abs(NUM_1) : NUM_1 ABS_2 ? abs(NUM_2) : NUM_2 (function() { if ( NUM_1_VALUE === NUM_2_VALUE ) { return "="; } return NUM_1_VALUE < NUM_2_VALUE ? "<" : ">"; })()

Fill in the blank.

NUM_1_ABS ____ NUM_2_ABS

SOLUTION

• <
• >
• =
randRangeNonZero(-9, 9) (NUM_1 < 0) ? randRange(1, 9) : randRange(-9, -1)
randFromArray([[1, 1], [1, 0], [0, 1]]) randFromArray(smallDenominators) NUMER_1 / DENOM NUMER_2 / DENOM fractionReduce(NUMER_1, DENOM) fractionReduce(NUMER_2, DENOM) ABS_1 ? "\\left\\lvert" + NUM_1_STRING + "\\right\\rvert" : NUM_1_STRING ABS_2 ? "\\left\\lvert" + NUM_2_STRING + "\\right\\rvert" : NUM_2_STRING ABS_1 ? abs(NUMER_1) : NUMER_1 ABS_2 ? abs(NUMER_2) : NUMER_2 fractionReduce(NUM_1_VALUE, DENOM) fractionReduce(NUM_2_VALUE, DENOM) (function() { if (NUM_1_VALUE === NUM_2_VALUE) { return "="; } return NUM_1_VALUE < NUM_2_VALUE ? "<" : ">"; })()

Fill in the blank.

NUM_1_ABS ____ NUM_2_ABS

SOLUTION

• <
• >
• =

The absolute value of a number is its distance from zero. The distance from 0 to NUM_1_STRING is NUM_1_VALUE_STRING so:

drawNumberLine(NUM_1);

The absolute value of a number is its distance from zero. The distance from 0 to NUM_2_STRING is NUM_2_VALUE_STRING so:

drawNumberLine(NUM_2);

Is NUM_1_VALUE_STRING less than, greater than, or equal to NUM_2_VALUE_STRING?

NUM_1_VALUE_STRING SOLUTION NUM_2_VALUE_STRING

So, NUM_1_ABS SOLUTION NUM_2_ABS.

The absolute value of a number is its distance from zero. The distance from 0 to NUM_1 is NUM_1_VALUE so:

drawNumberLine(NUM_1);

The absolute value of a number is its distance from zero. The distance from 0 to NUM_2 is NUM_2_VALUE so: