Hi Shilpa ,it can be an expression rule to find out whether a number is prime or not. You would need to create that rule. I would suggest you to create this logic .

The idea is to find the number of number by which the given number can be divided.

As the mod() function works with lists, I try the first 100 numbers. The compare operator "=" also works with lists. And the sum() interprets true and false like 1 and 0.

I would like to tweak the logic as the below code does not exclude 1 which is not a prime number since 1 has less than one factor, A prime number needs to have exactly two factors.

I would like to tweak the logic as the below code does not exclude 1 which is not a prime number since 1 has less than one factor, A prime number needs to have exactly two factors.