# Khan/khan-exercises

### Subversion checkout URL

You can clone with HTTPS or Subversion.

Fetching contributors…

Cannot retrieve contributors at this time

58 lines (57 sloc) 2.891 kb
 Significant figures 1
Array( randRange( 0, 2 ) ).join( '0' ) Array( randRange( 0, 2) ).join( '0' ) Array( randRange( 0, 4 ) ).join( '0' ) random() > 0.5 IS_ZERO ? true : random() > 0.5 randRange( 1, 9, randRange( 1, 6 ) ).join('') IS_ZERO ? '0' : randRange( 1, 9, randRange( 1, 4 ) ).join('') HAS_DOT ? LEADING + LEFTSIDE + '.' + RIGHTLEADING + RIGHTSIDE + TRAILING : LEADING + LEFTSIDE + TRAILING IS_ZERO ? RIGHTSIDE.length + TRAILING.length : HAS_DOT ? LEFTSIDE.length + RIGHTLEADING.length + RIGHTSIDE.length + TRAILING.length : LEFTSIDE.length IS_ZERO ? LEADING + LEFTSIDE + '.' + RIGHTLEADING : LEADING IS_ZERO ? RIGHTSIDE : HAS_DOT ? LEFTSIDE + '.' + RIGHTLEADING + RIGHTSIDE : LEFTSIDE

How many significant figures does TOTAL have?

SOLUTION

Identify the non-zero digits and any zeros between them. These are all significant.