title: Python: Why isn't this block of code exiting after 3 iterations?
body: <pre><code>for i in range(3):
      while True:
              x = random.randint(10,50)
              y = random.randint(10,50)
              xy = x*y
              print("What's " + str(x) +" * " + str(y) + "?")
              a = input()
              if int(a) == x*y:
                    print('YOU ARE CORRECT!')
                    time.sleep(.5)
              else:
                    print("DISHONOR!  THE ANSWER IS ACTUALLY " + str(x*y) + ".")
                    time.sleep(.5)
  
  print('next')
  </code></pre>
  
  <p>Why isn't the range(3) at the beginning having any effect on the code below it?  </p>