Datahut interview question

my straightness, knowledge in python