Domanda di colloquio di Happiest Minds Technologies

asked to solve 2 problems in python