Quantiphi Interview Question

Intro then basic questions, code for prime no. Basic OOPS concept