Amount Interview Question

Please review my python program