Python script that checks if and number has prime numbers before it