Praktis interview question

Hitting APIs and some logic.