# Khan/khan-exercises

### Subversion checkout URL

You can clone with HTTPS or Subversion.

Fetching contributors…

Cannot retrieve contributors at this time

118 lines (106 sloc) 3.578 kb
 Place value
shuffle([1, 2, 3, 4, 5, 6, 7, 8, 9]).slice( 0, 4 ) digitsToInteger( DIGITS ) randRange( 0, 3 ) DIGITS[POWER] (function() { var maxPower = DIGITS.length - 1; var products = jQuery.map( DIGITS, function( digit, index ){ return expr([ "*", digit, pow( 10, maxPower - index ) ]); }); return products.join( "+" ); })() (function() { var maxPower = DIGITS.length - 1; var words = jQuery.map( DIGITS, function( digit, index ) { return plural( digit, powerToPlace( maxPower - index ) ); }); return words.join( " + " ); })() (function() { var places = placesLeftOfDecimal.slice( 0, 4 ); return jQuery.map( places, function( place, i ) { return place + "s"; }); })() PLACES[ DIGITS.length - 1 - POWER ]

What is the place value of DIGIT in NUMBER?

SOLUTION

• place

NUMBER can be represented as follows.

= HINT_IN_NUMBERS

= HINT_IN_WORDS

Thus, DIGIT is in the SOLUTION place.

randRange( 0, 9, 4 ) digitsToInteger( DIGITS ) [ ] (function() { var maxPower = DIGITS.length - 1; return jQuery.map(DIGITS, function(digit, index) { if ( digit === 0 ) { return null; } if ( index === DIGITS.length - 1 ) { if ( DIGITS[ index - 1] === 0 ) { ADDENDS.push( digit ); return cardinal( digit ) + " is the same as " + digit; } } else if ( index === DIGITS.length - 2 ) { var addend = digit * 10 + DIGITS[ DIGITS.length - 1 ]; ADDENDS.push( addend ); return cardinal( addend ) + " is the same as " + addend; } else { var words = cardinal( digit ) + " " + powerToPlace(maxPower - index); var input = [ "*", digit, pow(10, maxPower - index) ]; var ex = expr( input ); var addend = expr( input, true ); ADDENDS.push( addend ); return words + " is the same as " + ex + " = " + addend; } }); })()

What is cardinal( NUMBER ) in standard form?

NUMBER

hint