Deloitte interview question

Behavoral Problem solving question Python