Prime Number Python Code Logical Operators