Electronic Arts Interview Question

what is wrong with this function