Citadel interview question

2 hour assessment in python