A prime number is a number that can't be divided by any of the prime numbers before it. Here, I add 2, the smallest prime number into the list and test each number after it if it can be divided by the numbers in the list. If it can't, I add that prime number into the list.