Infosys Interview Question

Monkey Patching Problem in Python(I was not able to answer it)