title: How to increase the value of a fraction in a loop with Python
body: <p>Im was trying to do a loop, increasing the numerator by 1 each iteration, but I got this error:</p>
  
  <blockquote>
    <p>ZeroDivisionError: Fraction(1, 0)</p>
  </blockquote>
  
  <p>My code is something like this:</p>
  
  <pre><code>from fractions import Fraction
  x = Fraction(0,48)
  z = x.numerator
  limit = (48,48)    
  while x == limit:
      print("cycle " + str(z))
      x += Fraction(1,0)
  print("loop finished!")
  </code></pre>