Question d’entretien chez Affirm

Scenario based question and solved using python