Texas Instruments Interview Question

Implement the power function.