Second and fourth question of assignment

Assignment question check a given number is prime or not. In this i understand to check any number is prime or not bt i dont get the logic which fails to check 2 is prime or not

hello @manoj2597

what logic u r using for detecting prime ?

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.