Prime no checker

Here why divisors are taken in series 2 to n-1 and considered it as not prime

here we have not taken 1 in the range because every number can be divisible by 1 and and every number will be divisible by itself as well .
That’s why we have not included 1and n so that we can check whether the number is divisible by any other number in between the range .
if you have doubt you can ask here .
Happy Learning !!