Sedco Interview Question

write a power function