# Khan/khan-exercises

### Subversion checkout URL

You can clone with
or
.
Fetching contributors…

Cannot retrieve contributors at this time

106 lines (80 sloc) 3.999 kB
 Exponents 1

This exercise covers exponential arithmetic with, in general, integer bases raised to nonnegative integer exponents. Handles three specific cases: integers raised to positive integers (this is the most common case); nonzero integers raised to 0; and -1, 0, and 1 raised to arbitrarily large positive integers. This exercise covers all the material presented in the Level 1 Exponents video.

pickIntegerBasePositiveExponent() VALS.base VALS.exp BASE > 0 ? "" : ( isEven( EXP ) ? "even" : "odd" )

\Large negParens( BASE )^{EXP}

round( pow( BASE, EXP ) )

Anything to the 0th power equals... ?

Anything to the 0th power equals 1.

Anything to the 1st power equals... ?

x^{1}=x, no matter what x is.

Cardinal( BASE ) to any NEG_ONE_HINT power equals... ?

Cardinal( BASE ) to any NEG_ONE_HINT power equals cardinal( round( pow( BASE, EXP ) ) ).

= v

Something went wrong with that request. Please try again.