Cognizant interview question

Introduction Python output One basic logical question.