# Khan/khan-exercises

Switch branches/tags
Nothing to show
Fetching contributors…
Cannot retrieve contributors at this time
88 lines (85 sloc) 3.9 KB
 Comparing absolute values
randFromArray([[ "|", "|" ], [ "|", "" ], [ "", "|" ]]) randRange(-10, 10) ( NUM_1 < 0 ) ? randRange(0, 10) : randRange(-10, -1) 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.

ABS_1 + NUM_1 + ABS_1 ____ ABS_2 + NUM_2 + ABS_2

SOLUTION

• <
• >
• =
drawNumberLine( NUM_1 );

The "absolute value" can be viewed as the distance from 0. The distance from NUM_1 to 0 is NUM_1_VALUE so |NUM_1| = NUM_1_VALUE

drawNumberLine( NUM_2 );

The "absolute value" can be viewed as the distance from 0. The distance from NUM_2 to 0 is NUM_2_VALUE so |NUM_2| = NUM_2_VALUE

Is NUM_1_VALUE less than, greater than, or equal to NUM_2_VALUE?

NUM_1_VALUE SOLUTION NUM_2_VALUE

ABS_1NUM_1ABS_1 SOLUTION ABS_2NUM_2ABS_2