Infosys UK interview question

Recursion in python with therotical explanation