Terrain Learning interview question

Can you write a script?