Terrascope interview question

Solve a scenario-based question using Python