Pergunta de entrevista da empresa Digit Insurance

Basic python codes, design question