Logical operators

Two messages error, need to solve this with a solution