DIA Associates Interview Question

What is wrong in this python code?