Mental Model
A prime number is a number greater than 1 that has no divisors other than 1 and itself. To check if a number is prime, we test if it can be divided evenly by any number from 2 up to its square root.
Analogy: Imagine you have a group of identical candies and want to split them evenly into smaller groups without leftovers. If you can only split them into one big group or single candies, then the number of candies is prime.
Number: 7 Check divisors: 2 7 % 2 != 0 No divisor found -> prime