title: Returns the smallest prime number that is a divisor of x
body: <p>The following code contains a mistake that can trigger an infinite loop,  I can not figure out how to get the second print statement to run, I am sure it is something simple to fix it, but just can't see it.</p>
  
  <pre><code>def smallest_prime_factor(x):
      """Returns the smallest prime number that is a divisor of x"""
      # Start checking with 2, then move up one by one
      n = 2
      while n &lt;= x:
          if x % n == 0:
              x += 1
              return n
  
  print(smallest_prime_factor(12)) # should be 2
  print(smallest_prime_factor(15)) # should be 3
  </code></pre>