LG Soft India interview question

Python code on prime numbers