Simple Prime Number Logic In Python