# Khan/khan-exercises

### Subversion checkout URL

You can clone with
or
.
Fetching contributors…

Cannot retrieve contributors at this time

88 lines (83 sloc) 3.144 kB
 Expressions with unknown variables 2
randRange( 1, 2 ) randRange( 2, 3, NUM_EXPRESSIONS ) [ randRange( 1, 9, 3 ), randRange( 1, 9, 3 ) ] (function() { var variables = [ [ "a", "b", "c" ], [ "x", "y", "z" ] ]; var group = []; for ( var i = 0; i < NUM_EXPRESSIONS; i++ ) { group.push( variables.shift().slice( 0, NUM_TERMS[ i ] ) ); } return group; })() [ randRangeNonZero( -10, 10 ), randRangeNonZero( -10, 10 ) ] [ randRangeNonZero( -10, 10 ), randRangeNonZero( -10, 10 ) ] (function() { var originals = []; jQuery.each( GROUPS, function( index, group ) { var coeffs = COEFFICIENTS[ index ]; var o = []; jQuery.each( group, function( i, variable ) { o.push( expr( [ "*", coeffs[ i ], variable] ) ); }); originals.push( o ); }); return originals; })() (function() { var expression = []; jQuery.each( GROUPS, function( index, group ) { var coeffs = COEFFICIENTS[ index ]; jQuery.each( group, function( i, variable ) { expression.push( expr( [ "*", (coeffs[ i ] * FACTORS[ index ] ), variable ] ) ); }); }); return expression; })() shuffle( MULTIPLIED_EXPRESSIONS ).join( " + " ) (function() { var answer = 0; for ( var i = 0; i < NUM_EXPRESSIONS; i++ ) { answer += ( FACTORS[ i ] * VALUES[ i ] ); } return answer; })()

If ORIGINAL_EXPRESSIONS[ 0 ].join( " + " ) = VALUES[ 0 ] and ORIGINAL_EXPRESSIONS[ 1 ].join( " + " ) = VALUES[ 1 ],

what is QUESTION?