Python implementation of the Fermat Primality Test