FIS Interview Question

asked me write python code