randRange( 0, 3 ) [ [ school(1), school(2), school(3), school(4) ], [ person(1), person(2), person(3), person(4) ], [ person(1), person(2), person(3), person(4) ], [ "Alabama", "Michigan", "New York", "Wyoming" ] ][ INDEX ] [ [ "3rd grade", "4th grade", "5th grade", "Total" ], [ "January", "February", "March", "Total" ], [ "1st Quarter", "2nd Quarter", "3rd Quarter", "4th Quarter", "Final" ], [ "Q1", "Q2", "Q3", "Q4", "Total" ] ][ INDEX ] randRange( 0, COLUMNS.length - 1 ) randRange( 0, ROWS.length - 1 ) (function() { var enrollments = []; var classMin = [ 60, 0, 2, 20 ][ INDEX ]; var classMax = [ 80, 6, 10, 40 ][ INDEX ]; for ( var i = 0; i < ROWS.length; i++ ) { var enroll = randRange( classMin, classMax, COLUMNS.length - 1 ); var total = 0; $.each( enroll, function( i, e ) { total += e; }); enroll.push( total ); enrollments.push( enroll ); } var answer = enrollments[ ROW_INDEX ][ COL_INDEX ]; enrollments[ ROW_INDEX ][ COL_INDEX ] = " "; return [ enrollments, answer ]; })() [ "shows the enrollment at four different elementary schools that have 3rd through 5th grade students", "shows the number of chickens sold by four friends from January to March", "indicates the points scored by four players in a charity basketball game", "shows solar panel installations by state during the last fiscal year" ][ INDEX ] [ "Schools", "Farmers", "Players", "States" ][ INDEX ] [ "students", "chickens", "points", "solar panels" ][ INDEX ] (function() { if ( COL_INDEX === COLUMNS.length - 1 ) { return [ "the total number of students at " + ROWS[ ROW_INDEX ] + " Elementary School", "the total number of chickens sold by " + ROWS[ ROW_INDEX ], "the total number of points scored by " + ROWS[ ROW_INDEX ], "the total number of solar panels installed in " + ROWS [ ROW_INDEX ] ][ INDEX ]; } else { return [ "the number of " + COLUMNS[ COL_INDEX ] + " students at " + ROWS[ ROW_INDEX ] + " Elementary School", "the number of chickens sold in " + COLUMNS[ COL_INDEX ] + " by " + ROWS[ ROW_INDEX ], "the number of points scored in the " + COLUMNS[ COL_INDEX ] + " by " + ROWS[ ROW_INDEX ], "the number of solar panels installed in " + COLUMNS[ COL_INDEX ] + " in " + ROWS[ ROW_INDEX ] ][ INDEX ]; } })() [ "The total number of students at " + ROWS[ ROW_INDEX ] + " Elementary School", "The total number of chickens sold by " + ROWS[ ROW_INDEX ], "The total number of points scored by " + ROWS[ ROW_INDEX ], "The total number of solar panels installed in " + ROWS [ ROW_INDEX ] ][ INDEX ]

The table below PROBLEM, except one entry is missing.

What number should go in the empty cell?

HEADERcolumn
rowenrollment
ANSWER UNIT

The table is missing HINT1.

The table accounts for ENROLLMENTS[ ROW_INDEX ].slice( 0, COL_INDEX ).join( "+" ) UNIT.

$.each( COLUMNS, function( i, c ) { if ( i !== 0 ) { $( ".fake_row" ).eq( ROW_INDEX ).find( "span" ).eq( i ) .css( "color", KhanUtil.ORANGE ); } });

HINT2 is simply the sum, or ANSWER.

fillInCorrectAnswer( ROW_INDEX, COL_INDEX, ANSWER, KhanUtil.PINK );

HINT2 is ENROLLMENTS[ ROW_INDEX ][ COLUMNS.length - 1 ].

$( ".fake_row" ).eq( ROW_INDEX ).find( "span" ).eq( COLUMNS.length ) .css( "color", KhanUtil.BLUE );

The table already accounts for ENROLLMENTS[ ROW_INDEX ].slice( 0, COL_INDEX ).concat( ENROLLMENTS[ ROW_INDEX ].slice( COL_INDEX + 1, COLUMNS.length - 1 ) ).join( "+" ) = ENROLLMENTS[ ROW_INDEX ][ COLUMNS.length - 1 ] - ANSWER UNIT.

$.each( COLUMNS, function( i, c ) { if ( i !== 0 ) { $( ".fake_row" ).eq( ROW_INDEX ).find( "span" ).eq( i ) .css( "color", KhanUtil.ORANGE ); } });

The missing number must be the difference between HINT2.slice( 0, 1 ).toLowerCase() + HINT2.slice( 1 ), ENROLLMENTS[ ROW_INDEX ][ COLUMNS.length - 1 ], and the values already accounted for, ENROLLMENTS[ ROW_INDEX ][ COLUMNS.length - 1 ] - ANSWER.

ENROLLMENTS[ ROW_INDEX ][ COLUMNS.length - 1 ] - ENROLLMENTS[ ROW_INDEX ][ COLUMNS.length - 1 ] - ANSWER = ANSWER

fillInCorrectAnswer( ROW_INDEX, COL_INDEX, ANSWER, KhanUtil.PINK );