Capgemini interview question

Basic logical coding questions were asked