Terralogic Interview Question

One logical program write on the paper