Thing is, we'll get this in our exams, so I must study it no matter how poor the performance, the pseudocode doesn't stop either, I sometimes wonder how the hell these teachers teach...
That seems incredibly counterproductive. As far as I can tell, all that functions does is raise a number to the power of n, which is indeed better done in a loop.