Capgemini Interview Question

Write a predicate implementation and execute.