We are looking at question 4.7 from Elements Of Programming Interviews in Python book.
EPI 4.7 Write a program that takes a double x and an integer y and returns x^y.
If you are applying for software engineering positions I highly recommend getting this book.
Here is the video I created which walk you through the solution.