$.map( randRange( 1000, 16000, randRange( 3, 7 ) ), function( n ){ return ( n / 1000 ).toFixed( randRange( 1, 2 ) ); } )
eval( $.map( VALUES, round ).join("+") )
randFromArray( [ [ "jogging", "ran", "mile" ], [ "riding a bicycle ", "traveled", "mile" ], [ "collecting mushrooms", "collected", "pound" ], [ "painting a roof", "painted", "square foot" ], [ "harvesting grain", "harvested", "tonne" ] ] )
0
$.map( VALUES, function( i ){
if ( round( i ) < i ) {
return "smaller than";
}
else{
return "bigger or equal to";
}
} )
(function() {
var sum = 0;
jQuery.each( VALUES, function( i, val ) {
sum += parseFloat( val );
});
return roundTo( 2, sum );
})()
person( 1 ) has been TYPES[ 0 ] every day for the last VALUES.length days.
Given that person( 1 ) TYPES[ 1 ] the following amounts (in plural( TYPES[ 2 ] )) each day, estimate how much he( 1 ) TYPES[ 1 ] in total by rounding each amount to a whole number and then summing.
Note that if you sum all the amounts first and then round, you'll get SUM.toFixed( 2 ). For fun, pay attention to how this number compares with your estimate.
i+1
val
ANSWER plural( TYPES[ 2 ] )
Round all the numbers to the nearest TYPES[ 2 ] and add them up.
i+1
val
round( val )
ACC += round( val )
Therefore the estimate is ANSWER
plural( TYPES[ 2 ] ).