Please note that by definition 1 is not a prime number. To check if a number n is a prime we should try to find a divisor i of n. If we cannot, then n is a prime. We have found a divisor when n % i == 0 evaluates to true. We only need to try odd numbers, since there's only one even prime, namely 2,...