Quantiphi interview question

Python programming