title: Computing Eulers Totient Function
body: <p>I am trying to find an efficient way to compute <a href="https://en.wikipedia.org/wiki/Euler%27s_totient_function" rel="noreferrer">Euler's totient function</a>.</p>
  
  <p>What is wrong with this code? It doesn't seem to be working.</p>
  
  <pre><code>def isPrime(a):
      return not ( a &lt; 2 or any(a % i == 0 for i in range(2, int(a ** 0.5) + 1)))
  
  def phi(n):
      y = 1
      for i in range(2,n+1):
          if isPrime(i) is True and n % i  == 0 is True:
              y = y * (1 - 1/i)
          else:
              continue
      return int(y)
  </code></pre>