Terralogic interview question

One logical program write on the paper